android - 所有 com.android.support 库必须使用完全相同的版本规范。找到版本 28.0.0、26.1.0
问题描述
所有 com.android.support 库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。找到版本 28.0.0、26.1.0。示例包括 com.android.support:animated-vector-drawable:28.0.0 和 com.android.support:support-media-compat:26.1.0 less (Ctrl+F1) 有一些库的组合,或者工具和库,不兼容或可能导致错误。一种这样的不兼容性是使用不是最新版本的 Android 支持库版本(或者特别是低于您的 targetSdkVersion 的版本)进行编译。问题 ID:GradleCompatible 问题 ID:GradleCompatible
build.gradle 中的依赖
dependencies {
implementation fileTree(dir:'libs',include:['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
testImplementation'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
}
解决方案
您可以通过添加具有以下内容的库来消除错误:
dependencies {
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
}
推荐阅读
- c++ - Qt 5 App 因“qLineEdit::setText”而崩溃
- java - 使用 Spring 4.1 在项目中注入依赖项
- android - 如何正确指定 CMakeLists 文件
- kentico - 使用新值更新后,全局键或本地化键值未获得正确值。在 kentico 12. 在同一个域中
- kotlin - 为什么可以将高阶函数的扩展函数参数调用为 Kotlin 中的普通函数?
- matlab - 如何在 Matlab GUIDE 列表框中使用动态数据列表
- java - Spring Boot REST 读取 JSON 数组有效负载
- selenium - 使用子元素的文本获取父元素的 XPath
- python - 如果列名 == Year 且值为 NaN pandas,则将数据框中的值向左移动
- vue.js - v-for 中的动态计算属性