I'm having this problem in my project, and I've tried the solutions in this posts: Post 1 Post 2, but doesn't work for me. The project runs perfectly on 1.2 version of Android Studio, the problem started when I upgraded to version 1.3
Here is my build.gradle file
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"
}
the complete error is this:
Error:Execution failed for task ':appName:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/user/Android/Sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1
In gradle console I have this errors:
:appName:processDebugResources
AGPBI: {"kind":"simple","text":"/home/user/Desktop/projects/UMobile/trunk/uniforMobile/build/intermediates/res/merged/debug/mipmap-xhdpi-v4/ic_launcher.png: error: Duplicate file.","sources":[{}]}
AGPBI: {"kind":"simple","text":"/home/user/Desktop/projects/UMobile/trunk/uniforMobile/build/intermediates/res/merged/debug/mipmap-xhdpi/ic_launcher.png: Original is here. The version qualifier may be implied.","sources":[{}]}
How can I solve this?