我正在尝试学习android studio。在这台计算机上(不是我的),android studio版本是2.2.3
当我在gradle build中创建一个新项目时,发生错误。
错误:任务':app:processDebugResources'的执行失败。
我一直在寻找此错误一天。我在任何地方都找不到相同的主题,因此我必须打开此线程。感谢您从现在开始的所有答案。
这是build.gradle(project:myapplication2)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
这是build.gradle(module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.0"
defaultConfig {
applicationId "com.example.alicetin.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'])
compile 'com.android.support:appcompat-v7:28.+'
testCompile 'junit:junit:4.12'
}
最佳答案
尝试
implementation 'com.android.support:appcompat-v7:27.1.1'
代替
compile 'com.android.support:appcompat-v7:28.+'
appcompat-v7版本28仍为 alpha
关于android-studio - 错误: more than one library with package name 'android.support.graphics.drawable' ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/51024717/