I upgraded my build.gradle file from
compile \'com.google.android.gms:play-services:8.4.0\'
to
compile \'com.google.android.g
The easiest way I found is to use the latest version for all.
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//apply plugin: 'com.google.gms.google-services' //Firebase
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
compile 'com.google.firebase:firebase-auth:10.2.6'
compile 'com.google.android.gms:play-services-auth:10.2.6' //10.2.6
compile 'com.google.firebase:firebase-core:10.2.6' // used for FCM
compile 'com.google.firebase:firebase-messaging:10.2.6' // used for FCM
testCompile 'junit:junit:4.12'
// apply plugin: 'com.google.gms.google-services'
}
EXPLAINATION
apply plugin: 'com.google.gms.google-services' // Add this at bottom.
apply plugin: 'com.google.gms.google-services' // Add this at bottom.Then, add these into dependencies
compile 'com.google.firebase:firebase-auth:10.2.6' // make suere this is in latest version.
compile 'com.google.android.gms:play-services-auth:10.2.6' //10.2.6 Latest
compile 'com.google.firebase:firebase-core:10.2.6' // used for FCM
compile 'com.google.firebase:firebase-messaging:10.2.6' // used for FCM
Suppose if you have firebase-auth 10.2.6 that is latest today 25, May 2017, But simultaneously you're using play-services-auth:9.0.0 or below than latest, then they both can't make the connection and show you the error.
I hope this helped.