This repository was archived by the owner on Oct 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
This repository was archived by the owner on Oct 25, 2021. It is now read-only.
build failed - Cannot add extension with name 'googleServices', as there is an extension already registered with that name. (cordova-plugin-firebasex compatibility) #130
Copy link
Copy link
Open
Labels
Description
Im install [email protected], and already have [email protected] in my project. And have error when trying to build android apk.
ERROR:
- Where:
Script 'C:\software\rep\veo.mobile\projects*appname*\platforms\android\cordova-plugin-appcenter-push*appname*-AppCenterPush.gradle' line: 14
- 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.
Now im have the same code in /platforms/android/cordova-plugin-appcenter-push/appname-AppCenterPush.gradle:
buildscript {
repositories {
google()
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.google.gms:google-services:4.0.1'
}
}
ext.postBuildExtras = {
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
}
and /platforms/android/cordova-plugin-firebasex/appname-build.gradle:
buildscript {
repositories {
google()
maven {
url "https://maven.fabric.io/public"
}
mavenCentral()
jcenter()
}
dependencies {
classpath "io.fabric.tools:gradle:1.30.0"
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}
repositories {
mavenCentral()
maven {
url "https://maven.google.com"
}
}
cdvPluginPostBuildExtras.add({
// Use class instead of id (string) to be able to apply plugin from non-root gradle file
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
apply plugin: com.crashlytics.tools.gradle.CrashlyticsPlugin
// Enable Crashlytics NDK reporting
crashlytics {
enableNdk true
}
})
Repro Steps
Please list the steps used to reproduce your issue.
- Install [email protected]
- install [email protected]
- run cordova compile android
Details
-
Which SDK version are you using?
0.5.1 -
What version of Cordova, Cordova platforms?
Cordova version 9.0.0
Installed platforms:
android 8.0.0
ios 5.0.1 -
What third party plugins are you using?
- com.verso.cordova.clipboard 0.1.0 "Clipboard"
- cordova-android-support-gradle-release 3.0.0 "cordova-android-support-gradle-release"
- cordova-base64-to-gallery 4.1.3 "base64ToGallery"
- cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
- cordova-plugin-android-permissions 1.0.0 "Permissions"
- cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
- cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
- cordova-plugin-appcenter-push 0.5.1 "App Center Push for Cordova"
- cordova-plugin-appcenter-shared 0.5.1 "App Center shared code for Cordova"
- cordova-plugin-appsflyer-sdk 4.4.15 "AppsFlyer"
- cordova-plugin-camera 4.0.3 "Camera"
- cordova-plugin-contacts 3.0.1 "Contacts"
- cordova-plugin-datepicker 0.9.3 "DatePicker"
- cordova-plugin-decimal-keyboard-wkwebview 1.0.3 "Decimal Keyboard"
- cordova-plugin-device 2.0.2 "Device"
- cordova-plugin-file 6.0.1 "File"
- cordova-plugin-file-opener2 2.2.1 "File Opener2"
- cordova-plugin-file-transfer 1.7.1 "File Transfer"
- cordova-plugin-firebase-lib 4.0.1 "Google Firebase Plugin"
- cordova-plugin-firebasex 6.0.7 "Google Firebase Plugin"
- cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
- cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
- cordova-plugin-ionic-webview 4.1.0 "cordova-plugin-ionic-webview"
- cordova-plugin-ios-keychain 3.0.1 "KeyChain Plugin for Cordova iOS"
- cordova-plugin-iroot 0.8.1 "iRoot"
- cordova-plugin-listpicker 2.2.2 "ListPicker"
- cordova-plugin-network-information 2.0.1 "Network Information"
- cordova-plugin-splashscreen 5.0.2 "Splashscreen"
- cordova-plugin-statusbar 2.4.3-dev "StatusBar"
- cordova-plugin-whitelist 1.3.3 "Whitelist"
- cordova-plugin-wkwebview-inputfocusfix 1.0.4 "WKWebView Input Focus Fix"
- cordova-plugin-x-socialsharing 5.6.2 "SocialSharing"
- es6-promise-plugin 4.2.2 "Promise"