This is my build.gradle
apply plugin: \'com.android.application\'
android {
compileSdkVersion 25
buildToolsVersion \"26.0.2\"
android {
All
support
libraries need to be same version. If your compile SDK is 25,it's 25.3.0. If your compile SDK is 26, it's 26.0.0. Don't mix them
this should fix your problem
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support:recyclerview-v7:25.3.0'
I solved this problem by add this code in build.gradle
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.0'
}
}
}
}
I just changed the line
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
to
compile 'com.android.support:appcompat-v7:26.+'