I am testing 9-patch image .
Before everything works fine , and i rename drawable
file ic_button_beat_box_default.png
to ic_button_beat_box_d
What solved it for me was to set
aaptOptions {
cruncherEnabled = false
}
Then to run the app (icons were missing) then remove this option and run the app again. Hope it helps somebody.
try this, insert this code in android section in app gradle:
aaptOptions {
cruncherEnabled = false
}
This worked for me:
Build -> Clean Project.
and then
Build -> Rebuild Project.
I had the same issue. I was able to resolve it just by reducing one folder from chain. It is due to long file path. So try using minimum hierarchy for your project location.
Try setting this in your defaultConfig:
aaptOptions.setProperty("cruncherEnabled", false)
Rename your file again
ic_button_beat_box_default.9.png
to ic_button_beat_box_default9.png
because android studio takes ic_button_beat_box_default.9
instead of ic_button_beat_box_default.9.png
or another solution is add below line to your build.gradle(Module:app)
android{
aaptOptions {cruncherEnabled = false}
}