0

I created my Android application project, but it is not able to create R.java file and every reference to 'R' in my classes are marked as errors, because the R.java file does not exist.

I tried 2-3 projects but still the problem is same ..

What can I do??

Daniel Causebrook
  • 469
  • 1
  • 8
  • 20

3 Answers3

1

If you are fairly new to Android / Java ...

All of the answers given here are possibilities, but IMHO the most likely explanation is that you have an error in your project which is preventing R from being genned. In particular, check out your xml files for errors before you resort to some of the more extreme measures being advocated here.

Good luck ...

IanB
  • 3,489
  • 1
  • 20
  • 24
1

Delete R.java file from your source folder. Now Clean your project Click on Project >> Clean >> Clean Project selected below >> Select your project from list >> ok.

and also try this.

Right Click on your Projectname >> Android Tools >> Fix project Property

Preet_Android
  • 2,332
  • 5
  • 25
  • 43
0

If a newly created android project does not contain R.java then I suggest you to re-install ADT plugin.

Eclipse > Help > Installation Details > Select Adnroid Development Tools > Uninstall

Krrishnaaaa
  • 689
  • 11
  • 23