HOME > Android > Android Studio: "Cannot Resolve Symbol R" - What To Do?

Android Studio: "Cannot resolve symbol R" - what to do?

Using Android Studio to develop or optimize apps, you may encounter the "Cannot resolve symbol R" error. But the software doesn't explain what the red R in your project is all about.

This is what the error "Cannot resolve symbol R"

If you get the error "Cannot resolve symbol R" in Android Studio and some Rs in your project are marked red, this is often due to an error in the coding. So go through the lines again calmly and check if all characters and references are marked correctly.If you don't find any error in your app, the problem can also be due to a bug. Fortunately, you can easily fix this.

How to fix "Cannot resolve R" in Android Studio

If the error "Cannot resolve symbol R" occurs in Android Studio by mistake, try the following:
  1. Start Android Studio and open your project in which the error occurs.
  2. Now click on "Build" at the top and then on "Clean Project". The project will now be cleaned.
  3. Followed by selecting the action "Rebuild Project" under "Build" again.
  4. Next, mark one of the red Rs in your project and right-click on it.
  5. Im Kontextmenü wählen Sie dann „Create class R“.
  6. Bestätigen Sie das auftretende Fenster danach mit „OK“.
Behebt dies den Fehler nicht, kann in einigen Fällen auch die Neuinstallation von Android Studio helfen.

By Weisman

"Grub Rescue" - Troubleshoot Windows 10 :: How to change username in Windows 10
USEFUL LINKS