更新到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'
}

当前回答

我的问题解决了添加以下最新的dependencyimplementation“com.google.firebase:firebaseauth:16.0.4”

其他回答

正如您已经看到了上面的所有答案和评论,但这个答案是为了澄清一些新开发人员可能不容易得到的东西。

./gradlew-q依赖项app:依赖项--配置编译

毫无疑问,上面这条线将挽救你的生命,但如何从上面这条线上的结果中得到准确的点。

当您从上面的命令获得所有依赖关系图或列表时,您必须搜索代码中获得的冲突版本号。请参见下图。

在上面的图片中,您可以看到23.4.0正在创建问题,但这在我们的grade文件中找不到。因此,现在这个版本号(23.4.0)将保存我们。当我们有了这个编号时,我们将在上面命令结果的结果中找到这个编号,并直接在gradle文件中导入该依赖项。请参见下图以获得清晰的视图。

您可以清楚地看到com.android.support:cardview-v7:23.4.0和com.android.com/support:customtabs:23.4.0正在使用导致问题的版本。现在只需从依赖项中复制这些行列出并在gradle文件中显式使用,但带有更新的版本链接

实现“com.android.support:cardview-v7:26.1.0”实现“com.android.support:customtabs:26.1.0”

尝试使生成工具与支持库的版本完全相同

实例

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"
    defaultConfig {
        applicationId "com.itechnologyeg.*******"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    } 
dependencies {
 compile 'com.android.support:appcompat-v7:25.0.0'
    compile 'com.android.support:animated-vector-drawable:25.0.0'
    compile 'com.android.support:mediarouter-v7:25.0.0'
    compile 'com.android.support:recyclerview-v7:25.0.0'
    compile 'com.android.support:cardview-v7:25.0.0'
    compile 'com.android.support:design:25.0.0'
}

这很简单,只需强制所有v7和v4库使用您在依赖项之前设置的库版本。

configurations.all {
                    // To resolve the conflict for com.android.databinding
                    // dependency on support-v4:21.0.3
                    resolutionStrategy.force 'com.android.support:support-v4:28.0.0'
                    resolutionStrategy.force 'com.android.support:support-v7:28.0.0'
                }
implementation 'com.android.support:appcompat-v7:26.1.0'

在这行之后你必须在你的成绩中添加新的行

implementation 'com.android.support:design:26.1.0'

如果您在实现以下提到的所有新库后遇到问题。我在这个“com.android.support:appcompat-v7:27.1.0”兼容版本上遇到了上述相同的问题。

implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:mediarouter-v7:27.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:support-v13:27.1.0'
implementation 'com.android.support:support-v4:27.1.0'

我只是替换这

'com.android.support:appcompat-v7:27.1.0'

到此为止

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