我如何解决android studio 1.0.2构建错误(错误代码132)

时间:2015-02-04 21:36:07

标签: android android-studio gradle android-gradle

我几天前在ubuntu上下载了android工作室,开始学习android应用程序开发,但是我遇到了这个构建错误,我过去两天都无法解决。

这是错误

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    /home/rohit/Android/Sdk/build-tools/21.1.2/aapt package -f --no-crunch -I /home/rohit/Android/Sdk/platforms/android-21/android.jar -M /home/rohit/AndroidStudioProjects/TheTestProject/app/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /home/rohit/AndroidStudioProjects/TheTestProject/app/build/intermediates/res/debug -A /home/rohit/AndroidStudioProjects/TheTestProject/app/build/intermediates/assets/debug -m -J /home/rohit/AndroidStudioProjects/TheTestProject/app/build/generated/source/r/debug -F /home/rohit/AndroidStudioProjects/TheTestProject/app/build/intermediates/res/resources-debug.ap_ --debug-mode --custom-package com.example.rohit.thetestproject -0 apk --output-text-symbols /home/rohit/AndroidStudioProjects/TheTestProject/app/build/intermediates/symbols/debug
  Error Code:
    132

这是 build.gradle 文件:

  apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.example.rohit.thetestproject"
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
}

我尝试通过阅读类似问题上发布的一些解决方案来修复它,但它们没有用。

  • 构建 - >清洁项目(没有工作)
  • 使用构建工具版本20和目标SDK版本20(不起作用)
  • 试图查找未定义的字符串值(找不到)
  • 删除了menu_main.xml(无效)
  • 将此应用:showAsAction =“never”更改为此 android:showAsAction =“never”(无效)

0 个答案:

没有答案