All of a sudden I cannot get Gradle to build any projects under Android Studio.
Error:Execution failed for task \':app:processDebugResources\'. com
installing latest SDK/build-tool helps 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!
First try to clean and rebuild your project from Build menu.
Step 1: go to Build -> Clean Project
Step 2: go to Build -> Rebuild Project
This should solve your problem.
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
this error happened when you delete any resource as image which is used in any file the android studio rise this error
the solution
Build -> clean project Build -> rebuild project
good luck
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..!
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
to something_else_banner.png
since banner.png
must have been reserved), and it worked!
Other things I tried that failed:
:app:processDebugResources FAILED
.