android - 所有 com.android.support 库必须使用完全相同的版本规范。找到版本 28.0.0、26.1.0

标签 android android-studio android-gradle-plugin

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:support-media-compat:26.1.0 less (Ctrl+F1) There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion). Issue id: GradleCompatible Issue 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'
} 

关于android - 所有 com.android.support 库必须使用完全相同的版本规范。找到版本 28.0.0、26.1.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53456896/

相关文章:

android - 没有可用于离线模式的缓存版本 Gradle 插件

android - ViewModelProviders 在 1.1.0 中已弃用

Android Switch 小部件 textOn 和 textOff 未按预期工作

javascript - 如何在不提供任何填充的情况下将背景颜色应用于 View ?

android - 单击列表项而不是启动另一个 Activity 后应用程序不断崩溃

android - 离线数据绑定(bind) = 启用导致错误 : Could not find databinding-runtime. jar

android - Gradle错误:错误:任务 ':app:dexDebug'的执行失败

android - 在 fragment 的屏幕方向发生变化之前,无法摆脱 ActionBar 中的自定义 View

android - 如何在 Android Studio 中获取原始资源的文件路径?

android - 无法解析com.github.KingsMentor:MobileVisionBarcodeScanner:2.0.0