在我的android studio今天从2.2.3版到2.3版之后,我在'com.android.support:AppCompat-v7:25.2.0'依赖项上的build.gradle中发现了这个错误。但项目仍然可以运行。并且我运行一个Gradle依赖关系报告来查看我的依赖关系的完整树。显示如下所示。但我仍然不知道如何修复这个错误。
依赖树
------------------------------------------------------------
Project :app
------------------------------------------------------------
compile - Classpath for compiling the main sources.
+--- com.github.bumptech.glide:glide:3.7.0
+--- project :mylibrary
| +--- com.android.support:appcompat-v7:22.0.0 -> 25.2.0
| | +--- com.android.support:support-annotations:25.2.0
| | +--- com.android.support:support-v4:25.2.0
| | | +--- com.android.support:support-compat:25.2.0
| | | | \--- com.android.support:support-annotations:25.2.0
| | | +--- com.android.support:support-media-compat:25.2.0
| | | | +--- com.android.support:support-annotations:25.2.0
| | | | \--- com.android.support:support-compat:25.2.0 (*)
| | | +--- com.android.support:support-core-utils:25.2.0
| | | | +--- com.android.support:support-annotations:25.2.0
| | | | \--- com.android.support:support-compat:25.2.0 (*)
| | | +--- com.android.support:support-core-ui:25.2.0
| | | | +--- com.android.support:support-annotations:25.2.0
| | | | \--- com.android.support:support-compat:25.2.0 (*)
| | | \--- com.android.support:support-fragment:25.2.0
| | | +--- com.android.support:support-compat:25.2.0 (*)
| | | +--- com.android.support:support-media-compat:25.2.0 (*)
| | | +--- com.android.support:support-core-ui:25.2.0 (*)
| | | \--- com.android.support:support-core-utils:25.2.0 (*)
| | +--- com.android.support:support-vector-drawable:25.2.0
| | | +--- com.android.support:support-annotations:25.2.0
| | | \--- com.android.support:support-compat:25.2.0 (*)
| | \--- com.android.support:animated-vector-drawable:25.2.0
| | \--- com.android.support:support-vector-drawable:25.2.0 (*)
| \--- com.nineoldandroids:library:2.4.0
+--- project :tastytoast
| +--- com.android.support:appcompat-v7:25.0.1 -> 25.2.0 (*)
| \--- com.facebook.rebound:rebound:0.3.8
+--- com.android.support:appcompat-v7:25.2.0 (*)
+--- com.android.support:cardview-v7:25.2.0
| \--- com.android.support:support-annotations:25.2.0
+--- com.android.support:design:25.2.0
| +--- com.android.support:support-v4:25.2.0 (*)
| +--- com.android.support:appcompat-v7:25.2.0 (*)
| +--- com.android.support:recyclerview-v7:25.2.0
| | +--- com.android.support:support-annotations:25.2.0
| | +--- com.android.support:support-compat:25.2.0 (*)
| | \--- com.android.support:support-core-ui:25.2.0 (*)
| \--- com.android.support:transition:25.2.0
| +--- com.android.support:support-annotations:25.2.0
| \--- com.android.support:support-v4:25.2.0 (*)
+--- com.aurelhubert:ahbottomnavigation:1.2.3
| \--- com.android.support:design:23.2.1 -> 25.2.0 (*)
+--- com.android.support:support-v4:25.2.0 (*)
+--- com.squareup.retrofit2:retrofit:2.0.0
| \--- com.squareup.okhttp3:okhttp:3.2.0 -> 3.3.1
| \--- com.squareup.okio:okio:1.8.0
+--- com.squareup.retrofit2:converter-gson:2.0.0
| +--- com.squareup.retrofit2:retrofit:2.0.0 (*)
| \--- com.google.code.gson:gson:2.6.1
+--- com.squareup.picasso:picasso:2.5.2
+--- com.github.lovetuzitong:MultiImageSelector:1.2
| +--- com.squareup.picasso:picasso:2.4.0 -> 2.5.2
| \--- com.android.support:appcompat-v7:23.4.0 -> 25.2.0 (*)
+--- com.facebook.android:facebook-android-sdk:4.20.0
| +--- com.android.support:support-v4:25.0.0 -> 25.2.0 (*)
| +--- com.android.support:appcompat-v7:25.0.0 -> 25.2.0 (*)
| +--- com.android.support:cardview-v7:25.0.0 -> 25.2.0 (*)
| +--- com.android.support:customtabs:25.0.0
| | +--- com.android.support:support-compat:25.0.0 -> 25.2.0 (*)
| | \--- com.android.support:support-annotations:25.0.0 -> 25.2.0
| \--- com.parse.bolts:bolts-android:1.4.0
| +--- com.parse.bolts:bolts-tasks:1.4.0
| \--- com.parse.bolts:bolts-applinks:1.4.0
| \--- com.parse.bolts:bolts-tasks:1.4.0
+--- com.weiwangcn.betterspinner:library:1.1.0
| \--- com.android.support:appcompat-v7:22.1.1 -> 25.2.0 (*)
+--- com.weiwangcn.betterspinner:library-material:1.1.0
| +--- com.android.support:appcompat-v7:22.1.1 -> 25.2.0 (*)
| \--- com.rengwuxian.materialedittext:library:2.0.3
| +--- com.android.support:support-annotations:21.0.3 -> 25.2.0
| +--- com.nineoldandroids:library:2.4.0
| \--- com.android.support:appcompat-v7:21.0.3 -> 25.2.0 (*)
+--- com.squareup.okhttp3:logging-interceptor:3.3.1
| \--- com.squareup.okhttp3:okhttp:3.3.1 (*)
+--- com.pkmmte.view:circularimageview:1.1
+--- com.jeremyfeinstein.slidingmenu:library:1.3
+--- org.jsoup:jsoup:1.9.1
+--- com.foursquare:placepicker:0.5.7
| +--- io.reactivex:rxandroid:1.0.1
| | \--- io.reactivex:rxjava:1.0.13
| +--- com.google.android.gms:play-services-base:8.3.0
| | \--- com.google.android.gms:play-services-basement:8.3.0
| | \--- com.android.support:support-v4:22.2.0 -> 25.2.0 (*)
| +--- com.android.support:appcompat-v7:23.1.0 -> 25.2.0 (*)
| +--- com.google.code.gson:gson:2.5 -> 2.6.1
| +--- com.jakewharton.rxbinding:rxbinding:0.1.0
| | +--- com.android.support:support-annotations:22.2.0 -> 25.2.0
| | \--- io.reactivex:rxjava:1.0.12 -> 1.0.13
| +--- com.android.support:recyclerview-v7:23.1.0 -> 25.2.0 (*)
| +--- com.squareup.okhttp:okhttp:2.7.0
| | \--- com.squareup.okio:okio:1.6.0 -> 1.8.0
| \--- com.google.android.gms:play-services-location:8.3.0
| +--- com.google.android.gms:play-services-base:8.3.0 (*)
| \--- com.google.android.gms:play-services-maps:8.3.0
| \--- com.google.android.gms:play-services-base:8.3.0 (*)
+--- com.facebook.fresco:fresco:0.12.0
| +--- com.facebook.fresco:drawee:0.12.0
| | +--- com.android.support:support-v4:23.2.1 -> 25.2.0 (*)
| | \--- com.facebook.fresco:fbcore:0.12.0
| +--- com.facebook.fresco:fbcore:0.12.0
| \--- com.facebook.fresco:imagepipeline:0.12.0
| +--- com.android.support:support-v4:23.2.1 -> 25.2.0 (*)
| +--- com.facebook.fresco:imagepipeline-base:0.12.0
| | +--- com.android.support:support-v4:23.2.1 -> 25.2.0 (*)
| | +--- com.parse.bolts:bolts-tasks:1.4.0
| | +--- com.nineoldandroids:library:2.4.0
| | \--- com.facebook.fresco:fbcore:0.12.0
| +--- com.parse.bolts:bolts-tasks:1.4.0
| +--- com.nineoldandroids:library:2.4.0
| \--- com.facebook.fresco:fbcore:0.12.0
+--- com.android.support:multidex:1.0.1
+--- me.villani.lorenzo.android:android-cropimage:1.1.2
\--- com.android.support.constraint:constraint-layout:1.0.0-alpha8
\--- com.android.support.constraint:constraint-layout-solver:1.0.0-alpha8
(*) - dependencies omitted (listed previously)
我的分级:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile project(':mylibrary')
compile project(":tastytoast")
compile files('libs/BaiduLBS_Android.jar')
compile files('libs/IndoorscapeAlbumPlugin.jar')
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.aurelhubert:ahbottomnavigation:1.2.3'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.squareup.retrofit2:retrofit:2.0.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.lovetuzitong:MultiImageSelector:1.2'
compile 'com.facebook.android:facebook-android-sdk:4.20.0'
compile 'com.weiwangcn.betterspinner:library:1.1.0'
compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
compile 'com.pkmmte.view:circularimageview:1.1'
compile 'com.jeremyfeinstein.slidingmenu:library:1.3@aar'
compile 'org.jsoup:jsoup:1.9.1'
compile 'com.foursquare:placepicker:0.5.7'
compile 'com.facebook.fresco:fresco:0.12.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:multidex:1.0.1'
compile 'me.villani.lorenzo.android:android-cropimage:1.1.2'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
}
支持库依赖项中没有->25.2.0
的是com.android.Support:CustomTabs:25.0.0
,该依赖项包含在com.facebook.android:facebook-android:4.20.0
中
因此,将具有25.2.0
依赖项的行添加到build.gradle
:
compile 'com.android.support:customtabs:25.2.0'
在将targetSdkVersion更新到27之后,我得到了这个错误消息。 所有com.android.support库必须使用完全相同的版本规范(混合版本会导致运行时崩溃)。找到版本27.0.2、25.2.0.示例包括和 我知道我应该更新,但我不知道该如何更新,因为我没有在build.gradle中使用它,所以我尝试更新SDK工具,但问题仍然存在。波纹管已建好。级:
我正在尝试编写应用程序。我的三星手机有Android8.0版。我以为我的应用程序崩溃了,因为我在8.1(API 27)运行它。所以我降级了SDK版本等。但是现在当我尝试构建APK时,它会给我这个错误: 一切正常。Android支持库必须使用完全相同的版本规范(混合版本可能会导致运行时崩溃)。找到了27.1.1和26.1.0版本。例如com。Android支持:动画矢量绘图:27.1.1和com。A
当我今天将android studio从2.2.3版本更新到2.3版本时,我突然在依赖项的第一个编译行build.gradle中出现了这个错误 (首先是哪个依赖关系并不重要,但它总会给我这个错误): 所有com.android.support库必须使用完全相同的版本规范(混合版本会导致运行时崩溃)。找到25.2.0、24.0.0版本。示例包括com.android.support:animated
我使用当前版本的mapbox SDK导航。Android的导航SDK当前版本:V0.32.0,如果我在build.gradle(模块:App)中添加实现“com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.30.0”,则出现错误 所有com.android.support库必须使用完全相同的版本规范(混合版本会导致运行时崩溃)。找到28.0.0、
这是我的错误,整个项目都依赖于此 我的Gradle代码如下 再看一遍 这个错误是怎么发生的?我更新了android studio和gradle并构建了工具,因为我希望所有东西都是最新的,这个错误突然出现,我尝试了所有可能的方法来解决它,但失败了。只是这个错误没有解决,我的应用程序已经准备好了。 当前gradle是3.3,android Studio是2.3.1,最新的26个支持库appcompat