小编Ale*_*lex的帖子

所有com.android.support库必须使用完全相同的版本

当我今天将我的android工作室从版本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'
}
Run Code Online (Sandbox Code Playgroud)

android gradle

69
推荐指数
6
解决办法
5万
查看次数

标签 统计

android ×1

gradle ×1