Ali Bdeir
Ali Bdeir

Reputation: 4375

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.

Upvotes: 2

Views: 3228

Answers (1)

Kushan
Kushan

Reputation: 5984

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...

Upvotes: 4

Related Questions