【发布时间】:2018-07-16 21:30:17
【问题描述】:
我是 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'"
最后我尝试将“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'
}
【问题讨论】: