Invalid color in Android Compilation. How to fix .9.png
Asked Answered
R

0

1

I'm getting the following error when compiling in Android Studio

Android resource compilation failed
Output:  error: found an invalid color.

The image that is causing the error is already a .9.png file and it looks like this in Android Studio

enter image description here enter image description here

I am not sure how to solve this. I referred to this two questions

How can I track down the cause of Android "found an invalid color" error

Android : 9-Patch image Error

and both indicate that the border around the image should be transparent. I'm guessing I have to fix the "bad patches" shown in red. if that's the case how can I fix them and make the compilation succeed?

Rebarbative answered 30/11, 2018 at 14:18 Comment(2)
did you fin a solution to this ?Jonson
@Faridomastr yes! I literally made small changes to the file, saved it, reverted those changes, saved again and no more problems. Hope it is the same for you!Rebarbative

© 2022 - 2024 — McMap. All rights reserved.