Android dependency '..' has different version for the compile (..) and runtime (..) classpath

It appears that, previously, you were implicitly depending on the common-lib module to export Firebase SDKs to your app module. Now that you've changed from "compile" to "implementation", you're no longer exporting those SDKs. So, what's happening now is this: the google-services plugin is adding v9.0.0 of firebase-core to your app module since it no longer sees it present in the visible classpath of your app module.

You should be able to work around this by manually adding firebase-core to your app module at the correct version. Or, you can continue to export Firebase SDKs from your library module to your app module by switching to an "api" dependency instead of an "implementation" dependency.


this worked for me:

add following code into your your buildscript

subprojects {
  project.configurations.all {
     resolutionStrategy.eachDependency { details ->
        if (details.requested.group == 'com.android.support'
              && !details.requested.name.contains('multidex') ) {
           details.useVersion "version which should be used - in your case 11.6.0"
        }
     }
  }
}

Best Regards,

Eddi


Changing the version of google-services over the top level gradle file fixed the issue for me. It seems the older version is indirectly injecting the firebase-core versions and updating the firebase version explicitly makes the conflict

classpath 'com.google.gms:google-services:4.0.2' // Just updated the version here.