1

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?

Community
  • 1
  • 1

2 Answers2

1

Problem Solved!

I just renamed the mipmap folders with -v4 at the end.

  • 2
    Well done, but how did you get to that? Is there another answer you can link this too for example? Something people can get more info on the problem from. – weston Aug 12 '15 at 11:47
0

This is late but for my case I had deleted an image that was still being used.After re adding it and refreshing gradle all worked

Kennedy Kambo
  • 372
  • 4
  • 24
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/19043753) – Mauricio Wanderley Martins Mar 08 '18 at 11:36
  • @MauricioWanderleyMartins what link? – Floern Mar 08 '18 at 12:32