Ionic :app:processDebugGoogleServices (Version conflict)


#1

I installed push plugin on ionic app and got this build fail

Found firebase-messaging:11.6.2, but version 11.0.4 is needed for the google-services plugin.
:app:processDebugGoogleServices FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app: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 11.0.4.

my build.gradle (module:app)

dependencies {
    implementation fileTree(dir: 'libs', include: '*.jar')
    // SUB-PROJECT DEPENDENCIES START
    implementation(project(path: ":CordovaLib"))
    compile "com.facebook.android:facebook-android-sdk:4.+"
    compile "com.google.android.gms:play-services-base:11.0.4"
    compile "com.google.android.gms:play-services-ads:11.0.4"
    compile "com.android.support:support-v13:23+"
    compile "com.android.support:support-v13:27.+"
    compile "me.leolin:ShortcutBadger:1.1.17@aar"
    compile "com.google.firebase:firebase-messaging:11.6.2"
    // SUB-PROJECT DEPENDENCIES END
}

#2

change the version of firebase to 11.0.4


#3

make the version of play-services as firebase


#4

Change the setting inside the project.properties file.
Changing it in the build.gradle (module:app) does not help as this file gets overridden everytime you build your project.

I hope this helps someone else. :grinning: