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:generate
Try checking all the recentenly added 9patch files. they all must have the content markers on the 4 sides of the image
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
I used the Invalidate Cache and Restart Invalidate Cache and Restart option in android studio and it worked for me.
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.
I once accidently added .gif file in drawable folder, and faced this issue, if you find any unwanted file in drawable foalder.
Follow the following steps:-
You are good to go again!
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.`