У меня проблема, я не могу построить платформу Android.Я пытался удалить и повторно добавить его, но он не работает.Также обнаружите, что, возможно, это конфликт с пожарной базой?Некоторым удалось решить эту проблему путем удаления firebase, удаления платформы, добавления платформы и установки плагинов firebase, но у меня это не сработало.
Вот ошибка, которую я получаю при попытке собрать:
Preparing Firebase on Android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=D:\Program Files\Android\SDK (recommended setting)
ANDROID_HOME=D:\Program Files\Android\SDK (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
> Configure project :app
FAILURE: Build failed with an exception.
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
* Where:
Script 'D:\workspace\iganalytics\app\platforms\android\cordova-support-google-services\starter-build.gradle' line: 17
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
> Cannot add extension with name 'googleServices', as there is an extension already registered with that name.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
D:\workspace\iganalytics\app\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* Where:
Script 'D:\workspace\iganalytics\app\platforms\android\cordova-support-google-services\starter-build.gradle' line: 17
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
> Cannot add extension with name 'googleServices', as there is an extension already registered with that name.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
А вот файл cordova-support-google-services \ starter-build.gradle:
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.google.gms:google-services:4.2.0'
}
}
// apply plugin: 'com.google.gms.google-services'
// class must be used instead of id(string) to be able to apply plugin from non-root gradle file
ext.postBuildExtras = {
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
}
Я также пытался прокомментировать эту строку:
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
Но это не тактоже не работает.Спасибо за помощь