更新到android studio 2.3后,我收到了这个错误消息。我知道这只是一个提示,因为应用程序运行正常,但这真的很奇怪。

所有com.android.support库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。找到版本25.1.1、24.0.0。示例包括com.android.support:animatedvector-drawable:25.1.1和com.android.com/support:mediarouter-v7:24.0.0

我的成绩:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testCompile 'junit:junit:4.12'

    compile 'com.android.support:appcompat-v7:25.1.1'
    compile 'com.android.support:support-v4:25.1.1'
    compile 'com.android.support:design:25.1.1'
    compile 'com.android.support:recyclerview-v7:25.1.1'
    compile 'com.android.support:cardview-v7:25.1.1'
    compile 'com.google.android.gms:play-services-maps:10.2.0'
    compile 'com.google.android.gms:play-services:10.2.0'

    compile 'io.reactivex.rxjava2:rxjava:2.0.1'
    compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
    compile 'com.jakewharton:butterknife:8.4.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
    compile 'com.blankj:utilcode:1.3.6'
    compile 'com.orhanobut:logger:1.15'
    compile 'com.facebook.stetho:stetho:1.4.2'

    provided 'com.google.auto.value:auto-value:1.2'
    annotationProcessor 'com.google.auto.value:auto-value:1.2'
    annotationProcessor 'com.ryanharter.auto.value:auto-value-parcel:0.2.5'

    compile 'com.mikepenz:iconics-core:2.8.2@aar'
    compile('com.mikepenz:materialdrawer:5.8.1@aar') { transitive = true }
    compile 'com.mikepenz:google-material-typeface:2.2.0.3.original@aar'
    compile 'me.zhanghai.android.materialprogressbar:library:1.3.0'
    compile 'com.github.GrenderG:Toasty:1.1.1'
    compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.8.0'
    compile 'com.github.MAXDeliveryNG:slideview:1.0.0'

    compile 'com.facebook.fresco:fresco:1.0.1'
    compile 'com.github.bumptech.glide:glide:3.7.0'

    compile 'com.google.maps.android:android-maps-utils:0.4.4'
    compile 'com.github.jd-alexander:library:1.1.0'
}

当前回答

我的问题和你的相似。这里存在一个错误!

编译“com.android.support:appcompat-v7:25.3.0”

所有com.android.support库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。找到版本25.3.0、24.0.0。示例包括“com.android.support:animatedvector-drawable:25.3.0”和“com.andrio.support:mediarouter-v7:24.0.0”

看到这个示例包括“com.android.support:animatedvector-drawable:25.3.0”和“com.andrio.support:mediarouter-v7:24.0.0”

只需在依赖项中添加这些代码,确保版本相同。

compile 'com.android.support:animated-vector-drawable:25.3.0'
compile 'com.android.support:mediarouter-v7:25.3.0'

其他回答

我必须在gradle中添加以下行以删除错误这取决于您使用的与appcompat相同的版本

compile 'com.android.support:appcompat-v7:26+'

compile 'com.android.support:mediarouter-v7:26+'

确保所有Facebook SDK依赖项使用项目的相同支持库版本:

dependencies {
    // Facebook SDK dependencies, excluding Bolts
    compile "com.android.support:appcompat-v7:25.4.0"
    compile "com.android.support:cardview-v7:25.4.0"
    compile "com.android.support:customtabs:25.4.0"
    compile "com.android.support:design:25.4.0"

    compile "com.facebook.android:facebook-android-sdk:4.23.0"
}

可以使用以下方法解决问题:

打开AndroidManifest.xml文件。单击底部的“合并清单”选项在右侧,它将显示其他清单文件。以下是不同依赖项的单独清单文件,这些依赖项是您包含的,或者是由于其他依赖项的影响而包含的。找出错误消息中提到的依赖项。单击它以打开其清单文件。如果您的错误消息显示要更改元数据中的android:value属性,那么这里就是进行更改的地方。更改值和显示不匹配版本号的其他位置,并使用build.gradle文件中包含的版本进行更改。现在同步项目,您就可以开始了

如果appcompat上出现相同错误

implementation 'com.android.support:appcompat-v7:27.0.1'

然后添加设计解决了这个问题。

implementation 'com.android.support:appcompat-v7:27.0.1'
implementation 'com.android.support:design:27.0.1'

对我来说

implementation 'de.mrmaffen:vlc-android-sdk:2.0.6'

包括appcompat-v7:23.1.1

.didea/库

没有vlc,仅appcompat就足够了。

更新到Android Studio 2.3后,我遇到了完全相同的问题

将此行添加到依赖项解决了我的问题:

compile 'com.android.support:customtabs:25.2.0'