Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

During build of my android application I am getting the following error:

:app:mergeDev_testingDebugResources error: found an invalid color. 

I don't get any line of code or even which file it is having a problem with. I have a large number of outstanding changes (stupid me) which I don't want to roll back - but I'm totally stumped as to how to work out what is wrong.

like image 904
user3690202 Avatar asked Nov 28 '17 23:11

user3690202


Video Answer


2 Answers

For future reference - this error is what you get if you have added an image as a 9-pack and it isn't yet properly formatted with the black pixel borders. The error message could be far more helpful, i.e. actually saying which file the error occurs with would be nice, but the solution is just to go through all your 9 pack files in Android Studio and open then save each of them.

like image 69
user3690202 Avatar answered Sep 21 '22 00:09

user3690202


First of all, check your layout directory in file explorer bcoz when you have made changes in the main layout file then you could have changed respective example: v-21 or v-13 layout file too. This error occurs when you apply some element property which is not supported by previous versions like v-21.

I hope I have given detail about this, if any explanations are needed plz let me know.

like image 23
amit pandya Avatar answered Sep 21 '22 00:09

amit pandya