Cause
This error happened when one or more of your firebase or google play service library is an old version.
Solution
Simply Update all libraries to latest version.
If you have to use the old version (for example for sanctions or other reasons) follow this:
googleServices.disableVersionCheck = true
to end of your app/build.Gradle fileExample
// remote config uses the old version
implementation('com.google.firebase:firebase-config:16.1.3') {
exclude group: 'com.google.firebase', module: 'firebase-analytics'
exclude group: 'com.google.firebase', module: 'firebase-analytics-impl'
exclude group: 'com.google.android.gms', module: 'play-services-measurement'
exclude group: 'com.google.android.gms', module: 'play-services-measurement-impl'
}
implementation 'com.google.firebase:firebase-analytics:17.4.0'
implementation 'com.google.firebase:firebase-messaging:20.1.6'
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'