1

I changed my android plugin version to latest i.e. 3.3.0 and after syncing the project, the reference to R class has been lost and turned into red saying 'Cannot resolve symbol 'R''.

shahooo
  • 314
  • 3
  • 10
  • Go to File>>> Invalidate Cache and Restart – Zaid Mirza Jan 24 '19 at 13:42
  • 1
    Possible duplicate of [R cannot be resolved - Android error](https://stackoverflow.com/questions/885009/r-cannot-be-resolved-android-error) – Psytho Jan 24 '19 at 13:46
  • 1
    I had the same issue after updating the plugin version to 3.3.0, if you haven't already, update android studio to the latest version. That fixed it for me – Zach Jan 28 '19 at 19:37
  • @Zach Thank you that worked for me. after updating android studio, it automatically update the gradle version – shahooo Jan 31 '19 at 08:38

2 Answers2

1

Try

  1. Build > Clean Project and then Build > Rebuild Project.
  2. File > Invalidate caches
Bartek Pacia
  • 533
  • 1
  • 10
  • 22
0

I has updated my android studio version and after that were lots of errors. I had to reinstall android studio and after that all errors vanished. This does not required lots of time

Valentin
  • 330
  • 1
  • 10