Gradle Error aapt.exe

    buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:+'
        classpath 'com.jakewharton.hugo:hugo-plugin:1.1.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'hugo'
configurations {
    preprocess
}


android {
    compileSdkVersion 21
    buildToolsVersion "21.0.2"

    defaultConfig {
        applicationId "uz.taxiapp.android"
        minSdkVersion 14
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

    // make sure that lint errors don't fail the build as lint does not always work properly with the android gradle plugin
    lintOptions {
        abortOnError false
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile "com.android.support:support-v4:$depAndroidSupportVersion"
    compile "com.android.support:support-v13:20.0.+"
    compile "com.android.support:appcompat-v7:$depAndroidSupportVersion"
    compile 'com.google.android.gms:play-services:6+'
    compile "com.android.support:recyclerview-v7:$depAndroidSupportVersion"

    compile "com.j256.ormlite:ormlite-android:$depOrmLiteVersion"

    compile "com.google.code.gson:gson:$depGsonVersion"

    preprocess "com.squareup.dagger:dagger-compiler:$depDaggerVersion"
    compile "com.squareup.dagger:dagger:$depDaggerVersion"
    compile "com.squareup.picasso:picasso:$depPicassoVersion"
    compile "com.squareup:otto:$depOttoVersion"
    compile "com.squareup.retrofit:retrofit:$depRetrofitVersion"

    preprocess "com.jakewharton:butterknife:$depButterKnifeVersion"
    compile "com.jakewharton:butterknife:$depButterKnifeVersion"
    compile "com.jakewharton.timber:timber:$depTimberVersion"

    compile project (':JobQueue')

    compile "com.jpardogo.googleprogressbar:library:$depGoogleProgressbarVersion"
    compile 'com.iangclifton.android:floatlabel:1.0.1'}
android.applicationVariants.all { variant ->
    //Where to place the generated code
    variant.ext.set("gen_${variant.dirName}", file("${project.buildDir}/source/gen/${variant.dirName}"))

    //Do the actual preprocessor things
    variant.javaCompile.doFirst {
        File out = variant.ext.get("gen_${variant.dirName}")
        out.mkdirs()
        variant.javaCompile.options.compilerArgs += [
                '-processorpath', configurations.preprocess.getAsPath(),
                '-s', out
        ]
    }
}

      

This gradle code returns error

Error:Execution failed for task ':app:processDebugResources'.

      

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command' C: \ Users \ Alexey \ AppData \ Local \ Android \ sdk \ build-tools \ 21.0. 2 \ aapt.exe '' exited with non-zero exit value 1

+3


source to share


1 answer


If you have installed Java 8, uninstall it completely by installing Java 7 by updating your environment variables.



0


source







All Articles