The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 11.8.0

I faced the similar issue, where in the error message it states that

The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 11.8.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

Resolved resolves to 11.8.0

dependencies {
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    //Implementation 'com.google.android.gms:play-services-basement:15.0.1'
    //Implementation 'com.google.firebase:firebase-core:15.0.0'

   implementation 'com.google.firebase:firebase-core:11.8.0'.  // <<--- Add this
}

I solved my isssue by adding the line

implementation 'com.google.firebase:firebase-core:11.8.0'.  // <<--- Add this

Also if this doesn't fix the issue please add this line;

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

at the end of the same file like below;

...

dependencies {
  ....
}

....

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

Let me know if it solved our issue.

Thanks!


This conflict happens because of using older libraries solution is use latest one. In my case i was using firebase version 16.0.0 , current latest is 16.0.4 (07-02-2019)

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

rather than this

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