当我把我的Android Studio从版本2.2.3更新到2.3后,在我的build.gradle文件的第一个依赖项编译行出现了以下错误:
(无论哪个依赖项在第一位,都会给我这个错误):
所有com.android.support库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。发现版本25.2.0,24.0.0。例如包括com.android.support:animated-vector-drawable:25.2.0和com.android.support:mediarouter-v7:24.0.0
我已经查看了整个项目,并没有找到任何使用版本24.0.0的地方(我使用了ctrl + shift + F在整个项目中进行搜索)
这是我的build.gradle文件:
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionName "1.0"
versionCode 1
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
debug {
minifyEnabled true
shrinkResources true
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.google.android.gms:play-services:+'
compile 'com.squareup:otto:1.3.8'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.android.support:multidex:1.0.1'
}