Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java/Eclipse - No more R file ever

I'm on Eclipse for hours now and I didn't found a solution yet for my problem even after many searches on internet: I have no more R.java file on my projects.

On just created or on my old projects, i don't have R file anymore and I tried so many solutions (uninstall, re-install Eclipse, clean my project, check all my XMLs, fix problem with android tool and so on ...)

Please someone can tell me what to do in this case?

like image 978
Jackyto Avatar asked May 16 '13 09:05

Jackyto


3 Answers

Hey If you just updated to ADT Rev 22 :

I had the problem too. There is a new component in the Tools folder called "Android SDK Build-tools" that needs to be installed.

Step 1

Open the Android SDK Manager

Step 2

Select the newly added Build Tools and install. (If problem stays then go to Project Properties => Java Build Path => Order and Export and check Android Private Libraries, then clean and build project.

It may be necessary to repeat the process, restart the SDK Manager after the update and make sure it looks like this (all tools installed):

See the Build Tools in the image

More info:https://groups.google.com/forum/?fromgroups=#!topic/android-developers/rCaeT3qckoE%5B1-25-false%5D

like image 77
Rany Ishak Avatar answered Sep 22 '22 11:09

Rany Ishak


Perhaps in Project Properties -> Java Build Path -> Libraries you don't have:

  • Android 4.2.2 (or other version)
  • Android Dependencies ?

If so, then right click project - > Android tools -> fix android properties and see if this library showed up.

like image 45
Malachiasz Avatar answered Sep 20 '22 11:09

Malachiasz


Thank you all for saving me! I've spent the whole afternoon on search this error. Finally, my project works. By the way, I also encountered one problem which i wanna share with you:

After upgrading, even if my project has not errors anymore. During runtime, it seems it couldn't find the classes from the jars placed in \libs.

Go into Project=>properties => Java build path= > Order and Export. Please make sure all your jars are checked.

like image 43
Xmagic Avatar answered Sep 20 '22 11:09

Xmagic