Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R.menu cannot be resolved

Tags:

java

android

So I am going through the Android development tutorial and I have run into an early problem when creating menus. I created a folder under res called menu and put in game_menu.xml as I was told.

But the line inflater.inflate(R.menu.game_menu, menu); is telling me that R.menu cannot be resolved. As I probably shouldn't edit R.java by hand, I would appreciate some help on what to do.

like image 270
user430945 Avatar asked Aug 25 '10 16:08

user430945


1 Answers

Be sure you're importing your.package.R and not android.R

That fixed it for me.

like image 137
Beer Me Avatar answered Sep 17 '22 19:09

Beer Me