- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
今天我的 android studio 从版本 2.2.3 升级到 2.3 之后,我在 build.gradle 的 'com.android.support:appcompat-v7:25.2.0' 依赖项上遇到了这个错误。但是项目仍然可以运行。然后我运行一个 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)
我的gradle:
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'
}
最佳答案
在 com.android.support:customtabs:25.0.0
之后没有 -> 25.2.0
的支持库依赖项,已包含来自 com.facebook.android:facebook-android-sdk:4.20.0
因此,将带有 25.2.0
依赖项的那一行添加到您的 build.gradle
中:
compile 'com.android.support:customtabs:25.2.0'
关于android - 所有 com.android.support 库必须使用与版本 25.2.0、25.0.0 完全相同的版本规范,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43074234/
我收到多行错误,指出它有重复的类 Duplicate class android.support.v4.accessibilityservice.AccessibilityServiceInfoCom
我的项目昨天运行良好,今天却出现以下错误。请帮忙。 出了什么问题:无法解析配置“:app:debugCompileClasspath”的所有文件。 Could not find support-v4.
错误:配置项目“:app”时出现问题。 Could not find support-v4.jar (com.android.support:support-v4:24.0.0). Searched
我正在使用 react-native-webrtc 运行示例应用程序模块。我正在尝试在 android 中运行该应用程序,但出现这样的错误... * What went wrong: A probl
错误:配置项目“:app”时出现问题。 Could not find support-v4.jar (com.android.support:support-v4:24.0.0). Searched
我克隆了我的项目并使用 Android studio 打开,但构建失败并出现以下错误并且同一个项目在其他项目上运行良好。 出了什么问题:无法解析配置“:app:flavorUnsignedReleas
我正在运行示例应用程序......我正在使用 this模块.....但是我收到这样的错误... FAILURE: Build failed with an exception. * What went
我有一个 Ionic 项目,在升级到 OSx Mojave 后,出于某种原因不再构建。 该项目基于 Ionic 3 构建。 我有 Cordova CLI 7.0.0 当我运行时 ionic cordo
我有一个 Ionic 项目,在升级到 OSx Mojave 后,出于某种原因不再构建。 该项目基于 Ionic 3 构建。 我有 Cordova CLI 7.0.0 当我运行时 ionic cordo
添加 Android 平台(ionic cordova platform add android)后,我构建了我的 Ionic 项目(ionic cordova build android),但出现错
这个问题在这里已经有了答案: Manifest merger failed : Attribute application@appComponentFactory - Androidx (14 个答
关于我的 Gradle 文件中的以下“complie”: dependencies { compile 'com.android.support:support-v4:25.3.1' }
有些困惑。 我想更频繁地使用@supports 但是...我不关心浏览器如何看待它。希望您能说清楚,如果可以的话谢谢您。 如果浏览器本身不理解@supports,它如何计算@support 'not'
我刚刚升级到 Dart 2 和最新版本的 Flutter,现在我无法构建我的应用程序。我在互联网上环顾四周,但仍然不明白为什么会发生这种情况。 我得到的错误是: FAILURE: Build fail
我正在学习 Firebase,但由于以下错误而陷入困境: Error:Failed to resolve: com.android.support:customtabs:25.4.0 Error:Fa
我在构建本周时出于某种原因尝试使用Cordova进行项目时遇到问题: cordova build android gradle获取com.android.support:support alpha而不
对应的androidx是什么com.android.support:support-compat 的图书馆实现push notifications ? 他们说here它是 androidx 的一部分,
我正在尝试为我的应用设置插桩单元测试。并且我已根据以下开发者站点链接添加了依赖项。 https://developer.android.com/training/testing/unit-testin
当我想使用 Proguard 规则生成签名的 APK(发布)时,我收到了以下错误消息: Cannot find a version of 'com.android.support:support-an
这个问题在这里已经有了答案: Failed to resolve: com.android.support:appcompat-v7:26.0.0 (14 个答案) Failed to resolv
我是一名优秀的程序员,十分优秀!