Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

general

Error: Android Studio cannot resolve symbol r

Fahad Farid
svg viewer

For all the instances of R.id., the R will be red and give an error stating, can not resolve symbol R.

The easiest solution to this is:

  1. Check the XML files. If you delete a particular tag, it may remain in the .xml file and show an error.
  2. Sync the project by going to “Tools” -> “Android” -> “Sync Project with Gradle Files.”
  3. If that doesn’t work, clean the project by going to “Build” -> “Clean Project.”

This should solve the error and let you to continue working on the project.

RELATED TAGS

general

CONTRIBUTOR

Fahad Farid
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring