Android Studio MainActivityJava Cant resolve symbol "R"

0 Sean O'Brien · February 23, 2015
Ok so on main activity java, the reference "R" Cant be resolved. it says the resource ID can not be an empty string. Sorry if im causing inconvience i'm new to programming so if someone can explain what i should it will be appreciated.

Post a Reply

Replies

Oldest  Newest  Rating
+1 Spikeedoo G · March 3, 2015
Every once in a while this happens for me too.

What I do is on the toolbar for android studio go to Tools -> Android -> Sync Project with Gradle Files (May take about 20-30 seconds to complete)

Or build -> rebuild project (May also take some seconds)

If this doesn't work it might be something in an xml file.

This is all the info I can give. :)
0 Saifur Rahman Mohsin · March 3, 2015
Try cleaning the project. That will fix it right away. If it doesn't then your .xml files are probably having some bad code which will neat to be fixed after which you can clean the project again to test if the issue is resolved!
  • 1

Java / Android Development

107,317 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator