如何修复23.0.1 \ aapt.exe'',退出值非零为1
突然之间,我无法让Gradle在Android Studio下构建任何项目.
All of a sudden I cannot get Gradle to build any projects under Android Studio.
错误:任务':app:processDebugResources'的执行失败. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:处理命令 '\ Local \ Android \ sdk \ build-tools \ 23.0.0 \ aapt.exe''完成 非零退出值1
Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '\Local\Android\sdk\build-tools\23.0.0\aapt.exe'' finished with non-zero exit value 1
我的摇篮是
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.marathon.simplelist"
minSdkVersion 8
targetSdkVersion 22
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:23.0.1'
}
即使我创建了一个新的Blank Activity项目,我仍然会收到此错误.
Even if I create a new Blank Activity project I still get this error.
我已安装
SDK平台:5.X,5.1、5.0、4.4、2.3.3 SDK工具:SDK生成工具,SDK工具24.4,平台工具23.0.1
SDK Platforms: 5.X, 5.1, 5.0, 4.4, 2.3.3 SDK Tools: SDK Build Tools, SDK Tools 24.4, Platform-Tools 23.0.1
显然,由于没有新的空项目也无法构建,因此在本地进行了一些重新配置.关于如何解决此问题的想法?
Obviously something is reconfigured locally since even a new empty project will not build. Ideas on how I can resolve this?
首先尝试从构建"菜单清理并重建项目.
First try to clean and rebuild your project from Build menu.
第1步:转到构建->清洁项目
第2步:转到构建->重建项目
这应该可以解决您的问题.
This should solve your problem.
否则,尝试从SDK管理器更新Android SDK构建工具,并修改build.gradle以使用最新的buildToolsVersion,即"23.0.2".
Otherwise try updating Android SDK build tool from SDK manager and modify your build.gradle to use latest buildToolsVersion i.e "23.0.2" as of now