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''.
Asked
Active
Viewed 599 times
1
-
Go to File>>> Invalidate Cache and Restart – Zaid Mirza Jan 24 '19 at 13:42
-
1Possible 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
-
1I 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 Answers
1
Try
Build > Clean Project
and thenBuild > Rebuild Project
.File > Invalidate caches

Bartek Pacia
- 1,085
- 3
- 15
- 37
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
- 400
- 2
- 11