I am getting the following error while building the project. haven\'t used CoordinatorLayout in this project. just added as a dependency in build.gradle :
I am usin
I had this problem too; and i resolved that in this way:
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.1'
}
}
}
}
be careful my min SDk was 26 , you have to change it with yours!
If any of the answers mentioned here doesn't work then go to File > Invalidate Catches/Restart
Personally, I add the following line to my app/build.gradle:
implementation "com.android.support:design:${rootProject.ext.supportLibVersion}"
With this syntax, version is dynamical.
Make sure these two are the same version in your app level build.gradle file
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
I think that should solve the problem
Go to the directory where you put additional libraries and delete duplicated libraries.
"Program type already exists" Remove your /build directory contents, it has some Dex(?) problem with the generated binary files. Got to those answers just like you, they helped to resolve this problem but created many others. Build contents removal works for all.