Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R.java Missing in Android Project in NetBeans

I'm doing this for a project in AP Computer Science.

Basics:
Mac OS X 10.5.8
NetBeans 7.0
Android SDK 3.0 (Level 11)

So I'm trying out some of the Android API Demos in NetBeans (I prefer it over Eclipse) and I'm using samples\android-11\ApiDemos\ for the source. The R.java file is not generating and "package R does not exist". I've looked at other answers, and they say to Clean and Build the Project, but that option is grayed out in NetBeans (so are just the "Clean" and "Build" options). Any ideas on what I should try before I switch to Eclipse? I also have a computer running Windows 7 if I need to change the OS. Thanks!

like image 464
r43r31 Avatar asked May 26 '11 02:05

r43r31


1 Answers

Right-click your project and hit build. It will generate the missing R class for you. At least it did for me in Netbeans 7.1

like image 155
Christopher Cato Avatar answered Sep 25 '22 02:09

Christopher Cato