0

I generated a new Android project on Eclipse and the R.file is missing. I tried various procedures to try get it back, like cleaning the project and rebuilding it etc. but none of these solved my problem.

I am using Eclipse Indigo and running it on Ubuntu 12.04 LTS. I am thinking that I may need to install missing software from the Android SDK Manager but I'm not too sure.

Any suggestions?

C_B
  • 2,620
  • 3
  • 23
  • 45
  • So you have tried *cleaning the project*, *executing the project*, *restarting eclipse*, *changing a value in your `layout.xml` and saving it* and *closing & reopening the project*? I'd give all these a shot first. – Jeroen Vannevel Mar 10 '14 at 23:49
  • 1
    This link may help you : http://stackoverflow.com/questions/2757107/developing-for-android-in-eclipse-r-java-not-generating – Sushil Mar 10 '14 at 23:52
  • This link might be useful to you http://stackoverflow.com/questions/12545170/how-do-i-fix-the-errors/12545190#12545190 – G_S Mar 11 '14 at 02:06

2 Answers2

2

If you can't import you R in your Java class even after cleaning the project, then you have a critical mistake in you XML files e.g.

1) ERROR in any of yourLayout xml files

2) Any of the XML files name are included spaces, capital letters or start with number.

3) Any of your drawable images name contain capital letters, spaces or start with number.

Sami Eltamawy
  • 9,874
  • 8
  • 48
  • 66
0

Try one of my suggestions

1.clean your eclipse

./eclipse -clean

2.close and open your project back

3.make sure you select correct android SDK for your project. check your android manifesto to identify it.

Nurdin
  • 23,382
  • 43
  • 130
  • 308