Gradle aapt.exe错误

时间:2015-07-10 09:29:17

标签: android gradle

    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
        ]
    }
}

此gradle代码返回错误

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

com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:处理'命令'C:\ Users \Алексей\ AppData \ Local \ Android \ sdk \ build-tools \ 21.0。 2 \ aapt.exe''以非零退出值1结束

1 个答案:

答案 0 :(得分:0)

如果您已安装Java 8,请通过更新环境变量将其卸载完全安装Java 7。