From the book Android Application Development All-in-One For Dummies by
Barry Burd :
Every Android app has an R.java file. Android’s development tools generate
this file automatically. So normally, you don’t have to worry about R.java.
Occasionally, the file takes longer than average to be generated. In that
case, Eclipse finds references to the R class in the rest of your project’s
code and complains that your project has no R class. My advice is, wait!
If one minute of waiting doesn’t bring good results, follow these steps to
check your project settings:
1. Highlight your project in Eclipse’s Package Explorer.
2. In Eclipse’s main menu, choose Project.
A list of sub-menu items appears.
3. Look for a check mark next to the Build Automatically menu sub-item.
4. If you don’t see a check mark, select the Build Automatically sub-item
to add a one.
With any luck your R.java file appears almost immediately.
If your project is set to Build Automatically, and you still don’t have an
R.java file, try these steps:
1. Highlight your project in Eclipse’s Package Explorer.
2. In Eclipse’s main menu, choose Project.
A list of sub-menu items appears.
3. In Eclipse’s Clean dialog box, select the project that’s giving you
trouble along with the Clean Projects Selected Below radio button.
4. Click OK.
Cleaning the project should fix the problem. But if the problem persists,
close Eclipse and then restart it. (Eclipse occasionally becomes
“confused.”)
Hope that helped.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en