Search code examples
androidandroid-xmlandroid-colorandroid-attributes

Cannot resolve symbol @android:color/X anymore


Before, we were able to use the android-provided colors:

@android:color/white

,

@android:color/red

, and

@android:color/yellow

And so on.

However, THEY SUDDENLY disappeared. I now get a "cannot resolve symbol '@android:color/white' " error.

What's going on? Where'd the easy-to-access colors go?

Note: Android Studio can resolve android, but not @android:color/white.


Solution

  • try rebuilding the index and restarting.

    It's most definitely an index issue... sometimes android studio stupidly screws up the R.java and the indexes and only ways to rectify it are gradle sync... invalidate indexes restart and then rebuild and clean...