All of a sudden I cannot get Gradle to build any projects under Android Studio.
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
My Gradle is
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'
}
Even if I create a new Blank Activity project I still get this error.
I have Android Studio 1.3.1 installed with
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?
I also faced the same issue and worked for hours on it and finally found out the solution. The drawable file that I referred in my xml was not existed. I removed the code and rebuild the project. It worked. My advice if anyone face such an issue, please look into your res folder.
Add Below Library in gradle file .
Goto
gradle.properties
under Gradle Scriptsthen set
android.enableAapt2=true
clean and Rebuild the project
Have got the same error in React Native.I upgraded the android sdk version and resulted into this.
Root cause : old version's packager collect resources.
Solution : delete directories like 'drawable-xxxx' (ATTN:no 'v?' postfix) under $(rn_project)\android\app\src\main\re.
Reference :https://github.com/facebook/react-native/issues/5787#issuecomment-236408669
If the error is occuring while Gradle Processes Resources, then it is most likely an issue with your resources. Check your gradle console to make sure.
Double check any recent changes that you may have made to the
res
folder. In my case, I simply renamed a resource (banner.png
tosomething_else_banner.png
sincebanner.png
must have been reserved), and it worked!Other things I tried that failed:
:app:processDebugResources FAILED
.Always try to use the latest one for build tools. You have to change the line buildToolsVersion "XX.X.X" in build.gradle file (which generally resides under mobile directory in gradle 2.0) to the latest version : 23.0.2 or 24.0.2 or 25.0.2 (in my case). And then Rebuild Project. If you still have an issue, please try to update the corresponding build tool via Android SDK Manager.