【发布时间】:2015-11-03 19:25:11
【问题描述】:
我的项目中遇到了这个问题,我已经尝试了这篇文章中的解决方案: Post 1 Post 2,但对我不起作用。该项目在1.2版本的Android Studio上完美运行,当我升级到1.3版本时问题就开始了
这是我的 build.gradle 文件
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.6'
}
}
repositories {
mavenCentral()
mavenLocal()
}
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "br.appname"
minSdkVersion 11
targetSdkVersion 22
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
}
apt {
arguments {
resourcePackageName android.defaultConfig.applicationId
androidManifestFile variant.outputs[0].processResources.manifestFile
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
apt "org.androidannotations:androidannotations:3.3.2"
compile 'org.androidannotations:androidannotations-api:3.3.2'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.android:support-v4:r7'
compile 'com.loopj.android:android-async-http:1.4.8'
compile 'commons-lang:commons-lang:2.6'
compile 'com.crittercism:crittercism-android-agent:5.2.0'
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.j256.ormlite:ormlite-core:4.48'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
compile files('libs/android-smart-image-view-1.0.0.jar')
compile files('libs/libGoogleAnalyticsServices.jar')
compile 'com.android.support:support-v4:21.0.0'
compile "com.android.support:appcompat-v7:21.0.0"
}
完整的错误是这样的:
错误:任务 ':appName:processDebugResources' 执行失败。 com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:进程'命令 '/home/user/Android/Sdk/build-tools/22.0.1/aapt'' 完成 非零退出值 1
在 gradle 控制台我有这个错误:
:appName:processDebugResources
AGPBI: {“种类”:“简单”,“文本”:“/home/user/Desktop/projects/UMobile/trunk/uniforMobile/build/intermediates/res/merged/debug/mipmap-xhdpi-v4/ic_launcher.png: 错误:文件重复。","来源":[{}]}
AGPBI: {“种类”:“简单”,“文本”:“/home/user/Desktop/projects/UMobile/trunk/uniforMobile/build/intermediates/res/merged/debug/mipmap-xhdpi/ic_launcher.png: 原文在这里。版本限定符可能是 暗示。","来源":[{}]}
我该如何解决这个问题?
【问题讨论】:
标签: android android-studio gradle android-gradle-plugin build.gradle