I have a problem in my android project. I recently upgraded from lower version and then rebooted my OS with Linux. My project was working fine. But, now as I have compiled,
This isn't a multidex problem...it's a dependency merge conflict issue.
By the looks of it one of your dependencies has a sub-dependency on CoordinatorLayout but has specified a different version from the one which you are using. You can fix this by using a resolutionStrategy in your build.gradle to define the version of the support library to use.
First make a variable to define your support library version:
ext {
supportLibVersion = "26.1.0"
}
Then update your dependences to use this variable rather than the hard coded value (note the double quotes):
implementation "com.android.support:appcompat-v7:${supportLibVersion}"
implementation "com.android.support:design:${supportLibVersion}"
Then you can add a resolutionStrategy to your build.gradle:
configurations.all {
resolutionStrategy.eachDependency { details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion "${supportLibVersion}"
}
}
}
}
What this does is ask Gradle to ignore the version number specified in with the dependency and use your version.