0

I get the following error, while compiling / building my app with AndroidStudio 1.4:

Error:Execution failed for task ':app:processDebugResources'.> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/pepperonas/Android/Sdk/build-tools/23.0.2/aapt'' finished with non-zero exit value 1

Who knows what causes this issue? I spent a lot of time trying different gradle versions and configurations, but the error is raised again.

This is how my gradle looks like:

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'
}
Martin Pfeffer
  • 12,471
  • 9
  • 59
  • 68

1 Answers1

0

Got it. The issue comes from the two FAB-libraries I added to the project.

compile 'com.melnykov:floatingactionbutton:1.2.0'
compile 'com.github.clans:fab:1.6.1'

I guess some resources are named the same ("duplicate").

Martin Pfeffer
  • 12,471
  • 9
  • 59
  • 68