Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R.java file not getting generated

I'm unable to the R.java problem in my half built Facebook app. I have selected the "Build automatically" option, I cleaned my project. I did all the recommended solutions to generate my R.java file.But still no success. I have 2 R.java in my "gen" folder. I have put a screenshot for better understanding.

enter image description here

all the buttons, textview and imageviews are not being recognized.

like image 589
Nimit_ZZ Avatar asked Aug 08 '12 16:08

Nimit_ZZ


2 Answers

I too had similar issue...

I went through many link from Google, but no use. At last I open Android SDK Manager to see if any thing missing from installed packages, and found "Android SDK Built-tools" is not installed.

I installed and follow below steps:
1. re-open eclipse.
2. comment error lines
3. build All
4. uncomment error lines to see if error gone.

Hope this will help someone...

like image 118
Nayeem Avatar answered Sep 18 '22 13:09

Nayeem


Try this:

  1. Delete any import to an R.java class (like @zapl pointed out).
  2. Move your cursor to a reference to any button/layout/string/whatever-coming-from-R, delete the last character, and hit ctrl+space. Eclipse will try to codehint you, automatically importing the correct R.java.
  3. Just to keep it cool, clean and rebuild.
like image 34
Sergi Juanola Avatar answered Sep 19 '22 13:09

Sergi Juanola