Eclipse doesn't generate R.java and gen folder

GuilhE picture GuilhE · May 27, 2013 · Viewed 15.2k times · Source

I had to share this problem with you 'cause I lost an entirely morning around this. So what was my problem? Suddenly Eclipse refuses to generate R.java and create gen folder. I've tried all kind of solutions I came across in stackoverflow and some blogs:

  • Clean Project and Rebuild
  • Clean Project with Build Automatically off and then Rebuild
  • Create the gen folder
  • Create gen folder with a R.java dummy
  • Copy the gen folder from that project used in another project (different workspaces)
  • Validate all my .xml files

Nothing worked... So, what was the solution? I'll answer myself.

Answer

GuilhE picture GuilhE · May 27, 2013

Checking the SDK Manager worked for me. It seems Android Build Tools went missing :/
Strange behaviour from eclipse...

enter image description here

After installing it everything worked as expected. So here's another solution...

Hope it works for you,
Take care.