I have Android Studio Beta. I created a new project with compile my old modules but when I tried launching the app it did not launch with the message:
Error:
I tried every other solution, but no one worked for me. At the end, i solved it by using same dependency version by editing build.gradle
. I think this problem occurres when adding a library into gradle which uses different dependency version of support or google libraries.
Add following code to your build gradle file. Then clean
and rebuild
project.
ps: that was old solution for me so you should use updated version of following libraries.
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.1.0'
}
} else if (requested.group == "com.google.android.gms") {
details.useVersion '11.8.0'
} else if (requested.group == "com.google.firebase") {
details.useVersion '11.8.0'
}
}
}