Conflict Error, versions google services conflict


#1

“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 11.6.2.”

  1. We are trying to use Push notifications from IONIC 3 but it seems to have a conflict with our ADMOB free(that is currently working properly)

  2. On build.gradle everytime that we change versions and try compile it doesn’t make the change:
    dependencies {
    implementation fileTree(dir: ‘libs’, include: ‘*.jar’)
    // SUB-PROJECT DEPENDENCIES START
    implementation(project(path: “:CordovaLib”))
    compile “com.android.support:support-v13:27.+”
    compile “me.leolin:ShortcutBadger:1.1.17@aar”
    compile “com.google.firebase:firebase-messaging:11.6.2”
    compile “com.google.android.gms:play-services-base:11.0.4”
    compile “com.google.android.gms:play-services-ads:11.0.4”
    // SUB-PROJECT DEPENDENCIES END
    }dependencies {
    implementation fileTree(dir: ‘libs’, include: ‘*.jar’)
    // SUB-PROJECT DEPENDENCIES START
    implementation(project(path: “:CordovaLib”))
    compile “com.android.support:support-v13:27.+”
    compile “me.leolin:ShortcutBadger:1.1.17@aar”
    compile “com.google.firebase:firebase-messaging:11.6.2”
    compile “com.google.android.gms:play-services-base:11.0.4”
    compile “com.google.android.gms:play-services-ads:11.0.4”
    // SUB-PROJECT DEPENDENCIES END
    }


#2

I have a Same problem


#3

I found a solution ->
Go to platform/android/build.gradle File
replace
compile “com.google.android.gms:play-services-base:11.0.4”
compile “com.google.android.gms:play-services-ads:11.0.4”
with
compile “com.google.android.gms:play-services-base:15.0.1”
compile “com.google.android.gms:play-services-ads:15.0.1”

Now open platform/android/project.property file And replace
cordova.system.library.1=com.google.android.gms:play-services-base:11.0.4
cordova.system.library.2=com.google.android.gms:play-services-ads:11.0.4
with
cordova.system.library.1=com.google.android.gms:play-services-base:15.0.1
cordova.system.library.2=com.google.android.gms:play-services-ads:15.0.1

Then Reinstall you fcm plugin and run command -> ionic cordova run android
It’s work for me