chemerisuk / cordova-plugin-firebase-config

Cordova plugin for Firebase Remote Config
MIT License
21 stars 31 forks source link

Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin'] #10

Closed davidanaya closed 5 years ago

davidanaya commented 5 years ago

Hi

After installing this plugin with ionic cordova plugin add cordova-plugin-firebase-config --save I get an error

Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

    at build_5bkxx3xrq4q6xfo8g2ou2vzcs.run(/Users/.../platforms/android/app/build.gradle:148)

FAILURE: Build failed with an exception.

* Where:
Script '/Users/.../platforms/android/cordova-support-google-services/remix-build.gradle' line: 16

* 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.

These are the list of plugins I'm currently using (apart from cordova-plugin-firebase-config)

    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <plugin name="cordova-plugin-device" spec="^2.0.2" />
    <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
    <plugin name="cordova-plugin-ionic-webview" spec="^1.2.1" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.2" />
    <plugin name="cordova-sqlite-storage" spec="^2.4.0" />
    <plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
    <plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" />
    <plugin name="cordova-plugin-firebase" spec="2.0.3" />
    <plugin name="cordova-plugin-x-socialsharing" spec="5.4.1" />
    <plugin name="cordova-wmdatasources" spec="^1.0.142" />
    <plugin name="cordova-plugin-local-notification" spec="0.9.0-beta.3" />
    <plugin name="cordova-install-referrer" spec="@alpha-health/cordova-android-install-referrer@~0.0.1" />
    <engine name="android" spec="7.1.1" />

And this is the output of my ionic info

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.1.1 (cordova-lib@8.1.0)

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 7.1.1
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.2
    Node       : v8.11.1
    npm        : 6.4.1
    OS         : macOS
    Xcode      : Xcode 9.1 Build version 9B55

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

This is an Ionic app but I'm using the cordova plugin directly.

BluebambooSRL commented 5 years ago

Hi! did you find a solution?

chemerisuk commented 5 years ago

You have a conflict with some other firebase plugin.