Ali*_*tin 9 gradle android-studio build.gradle
我正在努力学习android studio.在这台电脑(它不是我的)Android工作室版本是2.2.3
当我在gradle构建时创建新项目时发生错误.
错误:任务':app:processDebugResources'的执行失败.
错误:包含名称为"android.support.graphics.drawable"的多个库
我一直在寻找这个错误.我没有在任何地方找到相同的主题所以我必须打开这个主题.谢谢你从现在开始的所有答案.
这是build.gradle(项目: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
}
Run Code Online (Sandbox Code Playgroud)
这是build.gradle(模块: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'
}
Run Code Online (Sandbox Code Playgroud)
小智 10
尝试
implementation 'com.android.support:appcompat-v7:27.1.1'
Run Code Online (Sandbox Code Playgroud)
代替
compile 'com.android.support:appcompat-v7:28.+'
Run Code Online (Sandbox Code Playgroud)
appcompat-v7版本28仍然是alpha版
小智 7
尝试
classpath 'com.android.tools.build:gradle:3.2.1'
代替
classpath 'com.android.tools.build:gradle:2.2.3'
我遇到了同样的问题,它为我工作。
| 归档时间: |
|
| 查看次数: |
14051 次 |
| 最近记录: |