在使用AndroidStudio 1.4编译/构建我的应用程序时出现以下错误:
错误:任务':app:processDebugResources'的执行失败。> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:进程'命令 '/home/pepperonas/Android/Sdk/build-tools/23.0.2/aapt''完成了 非零退出值1
谁知道导致这个问题的原因是什么?我花了很多时间尝试不同的gradle版本和配置,但错误再次引发。
这就是我的gradle的样子:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
apply plugin: 'com.android.application'
repositories {
jcenter()
flatDir { dirs 'libs' }
maven { url "https://jitpack.io" }
maven { url "http://dl.bintray.com/amulyakhare/maven" }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
defaultConfig {
applicationId "com.pepperonas.teds"
minSdkVersion 16
targetSdkVersion 23
versionCode 19
versionName "0.2.9b"
multiDexEnabled true
project.ext.set("archivesBaseName", "teds");
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def fileName = outputFile.name.replace(".apk", "-" + defaultConfig.versionName + ".apk");
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/pass-v1.1.1.jar')
compile files('libs/sdk-v1.0.0.jar')
compile(name: 'aesprefs-0.0.5', ext: 'aar')
compile(name: 'andcommon-0.0.5', ext: 'aar')
compile 'com.android.support:multidex:1.0.1'
compile('com.afollestad.material-dialogs:core:0.8.0.1@aar') {
transitive = true
}
compile('com.afollestad.material-dialogs:commons:0.8.0.1@aar') {
transitive = true
}
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.google.android.gms:play-services-ads:8.3.0'
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.mikepenz:iconics-core:1.7.6@aar'
compile 'com.mikepenz:google-material-typeface:1.2.0.1@aar'
compile 'com.mikepenz:fontawesome-typeface:4.4.0.1@aar'
compile 'com.mikepenz:octicons-typeface:3.0.0.1@aar'
compile 'com.mikepenz:community-material-typeface:1.2.64.1@aar'
compile 'com.melnykov:floatingactionbutton:1.2.0'
compile 'com.github.clans:fab:1.6.1'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
}
答案 0 :(得分:0)
知道了。问题来自我添加到项目中的两个FAB库。
compile 'com.melnykov:floatingactionbutton:1.2.0'
compile 'com.github.clans:fab:1.6.1'
我猜有些资源名称相同("重复")。