How do you cause com.actionbarsherlock to be in the gen folder of an Android project?

Go To


I'm trying to build and run the demos included with ActionBarSherlock. I go to File -> New Android project from existing source, and navigate to the samples/demos directory. The project is imported into eclipse, however, none of the R. references are resolved, because com.actionbarsherlock doesn't appear in the gen folder.

The actionbarsherlock library is being referenced (Properties -> Android -> Libraries). actionbarsherlock.jar is in the Android Dependencies folder.

Thanks for the help.

EDIT: Just referencing the library in another eclipse project causes com.actionbarsherlock to be properly generated. I have no idea why the same behavior in this demos project isn't generating com.actionbarsherlock.R.

EDIT 2: And now it has magically decided to work. I did nothing special, just continually referenced and un-referenced the library until it worked.

Thanks for looking all, the problem's been solved

2012-04-04 19:41
by MitchellSalad
You should delete the question if it is no longer relevant (since you answered yourself) - Jake Wharton 2012-04-04 19:48


the gen folder (and are generated during compilation. Try doing a clean and build to see if R and gen/ get created.

If they don't, then compilation is failing. If there are any errors in eclipse that are not related to missing, fix them or post them as a comment for more info.

This might be a problem with the import my.project.R statements at the top of each java file, but checking the errors will confirm or deny this.

2012-04-04 19:48
by edthethird


I don't think the gen folder is created until you try to run the app.

If this isn't the issue, you could try fixing the project properties. Right click on the project --> Android Tools --> Fix Project Properties

2012-04-04 19:44
by Cody