Not able to create new color item in colors.xml file

I solved the problem cleaning the project and build it again. If it doesn't work, invalidate caches and restart.

I'm using Android Studio 3.2

Invalidate Caches with File > Invalidate Caches / Restart... > Invalidate and Restart


Its a bug, and it happens for dimensions and possibly others. (Not just colours.) First time I saw it was the day I upgraded to AS 3.2.1.

But you may not need to clean, rebuild or invalidate caches. Try this:

(A) Cut and save (e.g. to NotePad) the flagged XML from the base folder and all qualified folders.
(B) Paste it back in, starting with the base folder

Update: 10Jan2019 [Dumb and dumber]

In fact, not even cutting and pasting is necessary. Suppose the following line is giving the problem...

<string name="edit">Edit</string>

Just change the tag to anything. e.g.

<xstring name="edit">Edit</string>

Then wait a second for removal to occur before changing it back