Cannot resolve symbol R

0 Suraj Davariya · March 20, 2015
Hey Bucky. :) What's up man? Hello everyone. :D
I have been coding since couple of days but there's one thing that annoys me the most. :getlost:

I have did the same thing what Bucky says then after also I am getting this error. :wassat:
Cannot resolve symbol 'R' :'(

Expecting reply. Thank you.  :angel:

    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(, menu); //

Post a Reply


Oldest  Newest  Rating
0 Kuroodo Ditory · March 21, 2015
Are you sure that R is an existing class, object, or variable? Are you sure that it's R and not r? Did you import? (Ctrl+shit+O to auto import)
+2 Hemin Desai · March 22, 2015
Hey bro,
Check all your resources again. I think this error is related to your id field. Check the id field wherever you have mentioned before in your java file. There is some error in that. 
I hope it helps you. :)
Good Luck and hope for the best results.

0 Ian Arbuckle · March 22, 2015
You can clean and build with gradle if you haven't solved it by now.
0 Joris Willig · April 22, 2015
@Hemin Desai, what do you mean exactly? I have the same problem and I'm completely new to android development. Could you walk me through what I need to check? Thanks in advance
0 Joris Willig · April 22, 2015
I found my problem: for some reason, the fact that the filename of a picture in my drawables contained a capital letter, caused the error. I found this problem through reading the errors produced by a project clean, which can be found in Build > Clean project (In android studio). Thank you all!
0 lily kao · April 22, 2015
check this page:
  • 1

Java / Android Development


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

Bucky Roberts Administrator