【发布时间】:2018-12-04 02:27:45
【问题描述】:
我正在尝试学习 android studio。在这台电脑上(不是我的)android studio 版本是 2.2.3
当我在 gradle build 时创建一个新项目时发生错误。
错误:任务 ':app:processDebugResources' 执行失败。
错误:多个库的包名称为“android.support.graphics.drawable”
我一直在寻找这个错误一天。我在任何地方都没有找到相同的主题,所以我必须打开这个帖子。感谢您从现在开始的所有答案。
这是 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'
}
【问题讨论】:
标签: android-studio gradle build.gradle