fechanique / cordova-plugin-fcm

Google FCM Push Notifications Cordova Plugin
624 stars 998 forks source link

Please fix the version conflict either by updating the version of the google-services plugin #556

Open ikishanoza opened 5 years ago

ikishanoza commented 5 years ago

I just added the plugin and got this error.. I tried many possible solution but I am stuck here from last 7 days.. can any one help me out ??? @fechanique

Found com.google.android.gms:play-services-maps:15.0.1, but version 10.+ is needed for the google-services plugin.
Found com.google.android.gms:play-services-location:15.0.1, but version 10.+ is needed for the google-services plugin.
:app:processDebugGoogleServices FAILED

> 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 10.+.

Here are my plugin list 👍

cordova-android-play-services-gradle-release 1.4.4 "cordova-android-play-services-gradle-release" cordova-android-support-gradle-release 1.4.5 "cordova-android-support-gradle-release" cordova-plugin-actionsheet 2.3.3 "ActionSheet" cordova-plugin-badge 0.8.7 "Badge" cordova-plugin-camera 4.0.3 "Camera" cordova-plugin-console 1.1.0 "Console" cordova-plugin-datepicker 0.9.3 "DatePicker" cordova-plugin-device 1.1.7 "Device" cordova-plugin-fcm-with-dependecy-updated 2.2.6 "Cordova FCM Push Plugin" cordova-plugin-file 6.0.1 "File" cordova-plugin-file-transfer 1.7.1 "File Transfer" cordova-plugin-googlemaps 2.4.6 "cordova-plugin-googlemaps" cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification" cordova-plugin-safariviewcontroller 1.5.4 "SafariViewController" cordova-plugin-splashscreen 4.1.0 "Splashscreen" cordova-plugin-statusbar 2.4.2 "StatusBar" cordova-plugin-whitelist 1.3.3 "Whitelist" cordova-sqlite-storage 2.5.0 "Cordova sqlite storage plugin" ionic-plugin-keyboard 2.2.1 "Keyboard"

ikishanoza commented 5 years ago

@fechanique please have a look into this ..this is not working even in fresh ionic project I don't why there is no questions regarding the same.. I am stuck here from almost 2 weeks .. please help

ajay92x commented 5 years ago

@KishanIos007 Open project.properties file available in android folder and replace 15.0.1 with 10.+ Also open android>cordova-plugin-fcm-with-dependecy-updated>*-FCMPlugin.gradle in editor and replace 15.0.1 with 10.+ if it is there.

montaserfzy commented 5 years ago

the same issue

john-doherty commented 5 years ago

Use only one version for all related libs in your build.gradle(Module: app) file:

dependencies {
    compile "com.android.support:support-v4:27.1.0"
    compile "com.android.support:support-v4:24.1.1+"
    compile "com.google.firebase:firebase-core:10.+"
    compile "com.google.firebase:firebase-messaging:10.+"
    compile "com.google.android.gms:play-services-analytics:10.+"
    compile "com.android.support:support-v4:+"
    compile "com.android.support:support-v4:27.+"
}

Then clean the project and rebuild

moonglan commented 5 years ago

Inside android > app > cordova-plugin-fcm Edit android-FCMPlugin.gradle Eidt the file to the following

buildscript {
    repositories {
            maven { url "https://maven.google.com" }
            jcenter()
            mavenLocal()
        }
    dependencies {
        classpath 'com.android.tools.build:gradle:+'
        classpath 'com.google.gms:google-services:+'
    }
}
// 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
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin