1

After importing the project file disappeared R.java I tried Project - Clean, nothing ...

enter image description here

Max Usanin
  • 2,439
  • 6
  • 36
  • 67

8 Answers8

7

Yes, if you've any errors on your *.xml files. The R.java file will not generate. Try to clear that errors first. After, clean your project and try to run.

Hope it helps you.

Praveenkumar
  • 25,445
  • 23
  • 94
  • 171
2

Go to Project and hit Clean. This should, among others, regenerate your R.java file.
OR there might be any error in one of XML files.

Jainendra
  • 23,989
  • 30
  • 120
  • 167
2

//once you import your project. your library jar files wont get import it seems.

try to put that libs in project from C:/user/musanin/ and D:/java/work_Max

Padma Kumar
  • 20,710
  • 17
  • 71
  • 129
2

Clear all errors from the "res" folder and clean. It will generate your R.java file.

pixelscreen
  • 1,915
  • 2
  • 17
  • 38
2

That implies errors on the layout or Manifest file , which are XML . Fix them first and clean the project

Raju yourPepe
  • 2,859
  • 15
  • 63
  • 131
2

Without Removing the error present in .xml file your R would not appear..Open your .xml file and see what the errors are..If they are false error then just format the .xml file [ctrl+shift+f this will format your file] and save it. Then Clean your project and buil it again..You will get your R.java back.. :-)

Rekha
  • 891
  • 1
  • 11
  • 20
1

Rectify the errors in the xml files and after that do

1) clean the project (or)

2) Restart the eclipse

Ram kiran Pachigolla
  • 20,647
  • 14
  • 56
  • 74
0

I lost the R files once importing the project. The reason was target SDK conflict (in .manifest file) between appcompat library and my project (my project had 19 whereas appcompat was 21).

  • Change the project's android:targetSdkVersion into that of appcompat library project.
  • Clean the project.

And you should be good to go.

Nathan Tuggy
  • 2,230
  • 27
  • 29
  • 38
RaUlUZ
  • 1