1
votes

When I use these two plugins in ionic 1

  1. cordova-plugin-fcm

  2. cordova-plugin-googleplus

then this type of error occurs:

BUILD FAILED in 1s
11 actionable tasks: 1 executed, 10 up-to-date
Error: /home/idiosys/ionic/seeCheckFolder/SeeCheck/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

What went wrong:

Execution failed for task ':processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.0.0.

What can be the reason for these errors?

3
Looks like it tells you what to do in the error output. Have you tried doing what it says? - SpyderScript

3 Answers

0
votes

remove fcm, google plus then install firebase plugin (https://ionicframework.com/docs/native/firebase/) then install google plus. remove and re-add android platform. it is work with me (ionic2). Note: firebase contains notification functions , also with badge number : )

0
votes

1 - Remove the entry from build.gradle:

// PLUGIN GRADLE EXTENSIONS START
apply from: "cordova-plugin-fcm/poc-FCMPlugin.gradle"
// PLUGIN GRADLE EXTENSIONS END

2 - specify proper versions for all other dependencies in project.properties file like:

cordova.system.library.1=com.google.firebase:firebase-core:10.2.0
cordova.system.library.2=com.google.firebase:firebase-messaging:10.2.0
cordova.system.library.3=com.google.android.gms:play-services-auth:10.2.0
cordova.system.library.4=com.google.android.gms:play-services-identity:10.2.0

3 - And bottom of build.gradle file add this line:

apply plugin: com.google.gms.googleservices.GoogleServicesPlugin

4 - Comment out all content of poc-fcmplugin.gradle file and instead of apply plugin: com.google.gms.googleservices.GoogleServicesPlugin use:

apply plugin: 'com.google.gms.google-services'

5 - Add classpath for google services in build.gradle classpath section like:

classpath 'com.google.gms:google-services:3.0.0'
0
votes

Please refer to below mentioned app and make sure android dependencies are correct .

https://market.ionicframework.com/starters/ionic-google-plus-fcm-and-ad-banner

implementation "com.google.android.gms:play-services-auth:10.+"
implementation "com.google.android.gms:play-services-identity:10.+"
implementation "com.android.support:support-annotations:27.+"
implementation "com.google.firebase:firebase-core:10.+"
implementation "com.google.firebase:firebase-messaging:10.+"
implementation "com.google.android.gms:play-services-base:10.+"
implementation "com.google.android.gms:play-services-ads:10.+"