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?
In my case, i was wrongly mentioned dp as d in dimension file. That cause this issue, once i corrected that value everything working fine. So due to some new added wrong values or files may cause this issue.
I've got the same problem. The solution was to move project folder into drive root folder. It looks like my project folder has huge path ("D:\DropBox\Dropbox\Video\Full Stack Web Development\Course 4 - Multiplatform Mobile App Development with Web Technologies\Week 3 - Deploying your App\Exercise 1\ionic\conFusion\"). After moving "Exercise 1" folder to the root of disk D, problem was gone.
Mostly, this problem cause by wrong resource in xml file, I suggest you return your code before everything is fine. then add your new code step by step and check xml file carefully.
It might be a bit too late to answer, but I didn't find a perfect answer, so here what worked for me:
I renamed couple of fields in attrs > declareStylable so they were pointing to non-existant enums and that's what caused a error for me.
In my case, I backtracked everything that I implemented and found that the issue was in the xml layout file that I was using for my login screen.
The relation that I had defined among the child views within the RelativeLayout(parent layout), was causing the error.
So the way to avoid such errors in future is to keep running/checking the code as soon as you implement anything, to avoid long backtracking(which was in my case).
Hope this would be of some help!
I spent nearly 12 hour to find the resolution to this issue and finally I found the resolution.
This kind of supernatural issue, might happen in the below cases,
When your code has some problem, like sometimes IntelliJ/AndroidStudio does not report the compilation errors. Open each class and check for any compilation issues, these compilations issues will be because of not able to resolve few dependencies.
When you have a library that is latest, but you are referring to the oldest version.(Similar to point 1).
When you have a library that is dependent on some other library and that in turn referencing to old library, but your direct library is referring to newer version.
Importing from JFrog Artifactory, but your cache is not cleared, and you app is still holding to older version of .aar file
Your current gradle version of the app is latest, but you imported some other project as library and that version is older.
Your current gradle version of the app is latest, but you imported .aar file from jfrog artifactory and that is build from older gradle version.
when you are trying all the above cases, clean and build, or if this doesn't work, try "invalidate cache and Restart".
error like this will fall in some or the other above mentioned cases.
Happy Coding..!