“cannot resolve symbol R” in Android Studio

“cannot resolve symbol R” in Android Studio

Click on Build->Clean Project and that will perform a gradle clean 这个没有试成功

 

In the latest versions of Android Studio, at least for me, the following works:

"Tools" -> "Android" -> "Sync Project with Gradle Files"

这个试验第二次 去掉了R的红色现象。  同时这个还可以用来解决,外来倒入文件引起的R显示红色的现象。