2

I've tried everything i can think of and i still can't get the R.java file to show up. It's supposed to be in the "gen" folder in eclipse when i create a new project i believe.

I tried the following:

  1. I went to Project > Clean...

  2. I heard that there might be issues in the xml files, i couldn't find any errors there.

  3. I tried using both android 2.1 and 2.2(my goal is to program in 2.2 but i tried both anyway).

Please help. I've seen a few other questions regarding the same issue on here; i've tried using the suggestions found in the answers to those questions but unfortunately, no luck.

Progress: 1

SOLVED: I found out i was missing Android SDK Platform Tools. If you're having the same problem, make sure you have it installed.

Go to Window > Android Sdk and Avd Manager > Available Packages > Android Repository > Android SDK Platform Tools(the latest version) > Install. Sorry for causing any confusions. I will one-up those who put some effort into helping me. Thank you very much for your efforts. :)

Drahakar
  • 5,986
  • 6
  • 43
  • 58
corecase
  • 1,278
  • 5
  • 18
  • 29

4 Answers4

2

Try a right-click on the project and select "Refresh". This usually does the trick for me when "Clean" does not.

hooked82
  • 6,336
  • 4
  • 41
  • 46
1

I have faced the same problem many times untill and unless u wont remove errors from ur

xml file or any java file.

Then clean uo ur project....

Cleaning of project wont work in case there is errors,plz check for the same

Richa
  • 3,165
  • 1
  • 22
  • 26
  • I don't have any errors in my xml files and i already mentioned that cleaning the project did not help. – corecase Aug 23 '11 at 04:21
1

if above option not working then try project->built automatically checked then clean project then try to run it

Android
  • 8,995
  • 9
  • 67
  • 108
1

you shall find the answer here..tat works for me. just try...

R file is missing android

Community
  • 1
  • 1
Dray
  • 1,904
  • 5
  • 27
  • 42
  • So, i would have to manually create the R.java file? That's what i understood from the answer... I thought the file should automatically generate each time i create a new android project? – corecase Aug 23 '11 at 06:03
  • It was not necessary to create the R.java file for the new projects. It will be created automatically. – Dray Aug 23 '11 at 06:07
  • 1
    It was not necessary to create the R.java file for the new projects. It will be created automatically. OK try this... remove your project form the eclipse (don't remove from the workspace.)and quit the eclipse. again open the eclipse and import your project from the workspace. then do some changes in your xml file and rebuild the project. hope this will fix ur problem. – Dray Aug 23 '11 at 06:15
  • It's solved man, thanks a lot for your efforts though. I can't believe i didn't notice earlier... I was missing a plug-in. -.- – corecase Aug 23 '11 at 06:16
  • 1
    oh. fine. have a happy coding :) – Dray Aug 23 '11 at 06:18