android - Gradle aapt.exe 错误

标签 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: Process 'command 'C:\Users\Алексей\AppData\Local\Android\sdk\build-tools\21.0.2\aapt.exe'' finished with non-zero exit value 1

最佳答案

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

关于android - Gradle aapt.exe 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31337260/

相关文章:

android - 关注评级提示

android - React-Native ToolbarAndroid 不支持 fontFamily

java - 检查互联网连接是否可用 (https)

java - Android HttpClient 错误

android图像exif阅读器第3方api

android - google-services.json 文件丢失

gradle - Gradle:如果从Groovy转到Kotlin,会有什么好处?

android - Libgdx项目导入构建路径错误

gradle - 无法清理Gradle项目

gradle - Allure 在本地计算机上生成空的报告页面