Reputation: 123
This is the output of my gradle console please help me out to solve this error, I am unable to build my project
Information:Gradle tasks [:facebook:generateDebugSources, :facebook:mockableAndroidJar, :facebook:prepareDebugUnitTestDependencies, :facebook:generateDebugAndroidTestSources, :lagaiKhai:generateDebugSources, :lagaiKhai:mockableAndroidJar, :lagaiKhai:prepareDebugUnitTestDependencies, :lagaiKhai:generateDebugAndroidTestSources]
Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
Error:Execution failed for task ':lagaiKhai:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
Information:BUILD FAILED
Information:Total time: 23.24 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console
Upvotes: 11
Views: 37002
Reputation: 1368
I once accidently added .gif file in drawable folder, and faced this issue, if you find any unwanted file in drawable folder.
Follow the following steps:-
You are good to go again!
Upvotes: 31
Reputation: 2814
The problem is due to the .9 patch image file which you have added in the drawable.
To fix the issue.
1) Check you have named the 9 patch image as(file_name.png to file_name.9.png). E.g: "myimage.9.png" in the drawable folder.
2) Must Ensure that the 9 patch image file contains the "Content Marker on the 4 sides of the image". (i.e: if you open the image in Android studio, you will able to view 4 black lines on 4 sides of the image.)
3) if you not able to view the Content Marker on the sides of the image, then kindly rename the image file from (file_name.9.png to file_name.png), the error will be vanished.
Upvotes: 0
Reputation: 420
A temporary solution is to place the code below in the module build.gradle
:
android {
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
}
And Sync the Project.Works for me.`
Upvotes: 12
Reputation: 6126
most of the time is a corrupt PNG image added recently to the project which cause this error. Check the git log and replace the file.
Sometimes menu : File > InvalidateCaches/Restart also helps
Upvotes: 0
Reputation: 61
I created a 9-Patch file according to https://developer.android.com/studio/write/draw9patch.html, as a result of that, I faced the same error.
I had drew just the parts I wanted to stretch, but not the entire line.
To fix it I drew the entire right and bottom lines of the 9-patch, and the parts I wanted to stretch I did it on the left and top lines.
Upvotes: 2
Reputation: 337
I used the Invalidate Cache and Restart Invalidate Cache and Restart option in android studio and it worked for me.
Upvotes: 1
Reputation: 1888
Try checking all the recentenly added 9patch files. they all must have the content markers on the 4 sides of the image
Upvotes: 5