我几天前在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'
}
我尝试通过阅读类似问题上发布的一些解决方案来修复它,但它们没有用。