views:

72

answers:

2

I downloaded the source for SpriteMethodTest, and I want to build it in Eclipse. So I Went:

File >> New >> Android Project >> Create Project From Existing Source >> SpriteMethodTest

It created the project alright, but the R class is not generated. Any file that references a resource in R says R cannot be resolved.

Importing android.R just results in R.drawable.background cannot be resolved. How do I generate R again?

A: 

Project -> Clean (select your project) -> Ok

This will trigger a re-build and so long as the project is configured as an Android project, R.java will be regenerated.

Chris Thompson
+1  A: 

Try the following:

  • Delete the gen folder
  • Project => clean
  • Right click => Android Tools => Fix project properties
  • Right click => Run as... => Android application
Macarse
Hmm... None of this works. The gen folder always remains empty.
sirconnorstack
After deleting it and making a "Fix project properties" what does Eclipse say?
Macarse
It doesn't say anything.
sirconnorstack
Where did you get the `SpriteMethodTest` src code?
Macarse