Search code examples
android-studio-2.1

Error "Cannot Resolve symbol R"


This problem has been addressed hundreds of times here but I haven't still solved it.

enter image description here

I have tried everything available on Stack Overflow and everywhere else:

  • Build -> Clean Project; Build -> Rebuild Project
  • Tools -> Android -> Sync Project with Gradle files
  • Update SDK Manager (it wasn't updated)
  • Add import android.R and import android.R.*

But now I don't know what to do.


Solution

  • (Posted on behalf of the OP).

    I had to update to buildToolsVersion "21.1.2".