gpt4 book ai didi

android - 安卓工作室中的 “All com.android.support libraries must use the exact same version specification”

转载 作者:行者123 更新时间:2023-11-29 23:16:50 41 4
gpt4 key购买 nike

我用的是当前版本的mapbox SDK导航。适用于 Android 的导航 SDK 当前版本:v0.32.0 如果我在 build.gradle (Module:app)

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:exifinterface:27.1.0

Gradle :

    dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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'

//Mapbox Dependencies
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:7.2.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.11.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.32.0'}

最佳答案

通过执行 ./gradlew app:dependencies(app 是一个模块名称,你的可以不同)并检查依赖树以查找带来不同兼容版本的依赖项来调试此类问题。

在您的情况下,显然依赖项已知 (com.mapbox.mapboxsdk:mapbox-android-navigation-ui) 因此您可以尝试这样解决它:

implementation ('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.32.0') {
exclude module: 'exifinterface'
}

关于android - 安卓工作室中的 “All com.android.support libraries must use the exact same version specification”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55194896/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com