【问题标题】:Gradle aapt.exe errorGradle aapt.exe 错误
【发布时间】:2015-07-10 09:29:16
【问题描述】:
    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: Process 'command 'C:\Users\Алексей\AppData\Local\Android\sdk\build-tools\21.0. 2\aapt.exe'' 以非零退出值 1 结束

【问题讨论】:

    标签: android gradle


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多