gpt4 book ai didi

java - 无法解析 : com. android.support :appcompat-v7:28. + ,错误:包名称为 'android.support.graphics.drawable' 的库不止一个

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:27:02 24 4
gpt4 key购买 nike

我是 Android Studio 的新手,我尝试了一切来解决这个问题“无法解决:com.android.support:appcompat-v7:28.+”

我尝试清理项目、使现金无效/重新启动并删除 .idea 并且仍然相同

出于学习的原因,我正在使用 android studio 2.2.1,我将其更新到 android studio 3 并且存在多个渲染问题,所以我返回到版本 2.2.1

我尝试添加

行家{
网址 ' https://maven.google.com/ ' 名称“谷歌”

所以,它遇到了另一个问题

"Error:Execution failed for task ':app:processDebugResources'.
> Error: more than one library with package name 'android.support.graphics.drawable'"

Error Photo

最后我尝试将“appcompat-v7:28.+”更改为“appcompat-v7:27”并且它有效但仍然告诉我我应该使用相同的库以避免错误

这是我的 Gradle 代码:

apply plugin: 'com.android.application'

android {
compileSdkVersion 28
buildToolsVersion "28.0.1"
defaultConfig {
applicationId "com.example.aimlive.myapplication"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:28.+'
testCompile 'junit:junit:4.12'
}

最佳答案

'com.android.support:appcompat-v7:28+' 替换为 'com.android.support:appcompat-v7:28.0.0'

并添加下面的依赖

implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'

关于java - 无法解析 : com. android.support :appcompat-v7:28. + ,错误:包名称为 'android.support.graphics.drawable' 的库不止一个,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51370352/

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