0

In every instance in all of my classes where I reference R.id.something, the R is in red and it says "cannot resolve symbol R".
And when I run 'app', it shows all the 'textColor' in styles.xml getting an error.

Alexander
  • 141
  • 1
  • 1
  • 6

2 Answers2

1

@Alexander : Main reason is R.java not generating .

Open the Android SDK Manager and Update with latest:

  1. Android SDK Tools
  2. Android SDK Build Tools

Then Clean with Re-Build and Restart Your Project

"cannot resolve symbol R" in Android Studio

And

Android Studio marks R in red with error message "cannot resolve symbol R", but build succeeds

Try this way ,I hope it will helps you .

Community
  • 1
  • 1
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
0

Problem of appcompat.. untill your res folder contains error. R.java will not be generated.

Bpatel
  • 77
  • 8