1

Error

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

Code

dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        implementation 'com.android.support:appcompat-v7:26.0.1'
        implementation 'com.android.support.constraint:constraint-layout:1.0.2'
        implementation 'com.google.firebase:firebase-core:11.0.4'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        compile 'com.android.support:cardview-v7:26.0.1'
        compile 'com.android.support:recyclerview-v7:26.0.1'
        compile 'com.android.support:design:26.0.1'
        compile 'com.android.volley:volley:1.0.0'
        compile 'com.squareup.picasso:picasso:2.4.0'
        compile 'com.google.android.gms:play-services-ads:11.4.2'
        compile 'com.google.firebase:firebase-messaging:11.4.2'
        compile 'com.google.firebase:firebase-core:11.4.2'

    }


    apply plugin: 'com.google.gms.google-services'
Maciej Jureczko
  • 1,560
  • 6
  • 19
  • 23

1 Answers1

2

The problem is this:

implementation 'com.google.firebase:firebase-core:11.0.4'

While the other libraries are a different version:

compile 'com.google.android.gms:play-services-ads:11.4.2'
compile 'com.google.firebase:firebase-messaging:11.4.2'
compile 'com.google.firebase:firebase-core:11.4.2'

The version of the gsm/firebase libraries have to match, otherwise you get that error.

WHich you change is up to you, but all the versions have to match. If you change the firebase-core implementation line to:

implementation 'com.google.firebase:firebase-core:11.4.2'

It will work. Note that this is a universal answer; Any of the firebase or GSM libraries have to match in version. It's irrelevant what dependency, it applies to all

Zoe
  • 27,060
  • 21
  • 118
  • 148