Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Unable to fnd class R.java No such file or dir

I keep getting this when trying to start a new project

ERROR: Unable to open class file C:\Users\Levi\Desktop\Android\workspace\Droid1\gen\com\androidbook\droid1\R.java: No such file or directory

I tried changing preferences to alter build path to project, but it still wouldnt work,,,

Is subfolder on desktop a bad place to install Eclipse?

like image 420
LuxuryMode Avatar asked Dec 21 '22 22:12

LuxuryMode


1 Answers

Clean works sometimes and should be tried. I also find that blowing away the gen directory and refreshing will cause it be to rebuilt. Try that as well.

However, sometimes even that doesn't work and I've been forced to remove the project from Eclipse and then re-import it. This, unfortunately, works for me every time if the above has not.

Good luck.

like image 57
Gray Avatar answered Jan 03 '23 22:01

Gray