Java/Eclipse - No more R file ever

26,764

Solution 1

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

Solution 2

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.

Solution 3

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.

Solution 4

If this problem occurs suddenly in a well working project,

the first step is to find whether the problem occurs only in the current project or in all other projects.

if all other projects in the current workspace are working then 90% problem is with XML / mainfestfile/resourse file that you edited recently.

This error is not shown as red mark we have to find out what we have done recently in these files.

Solution 5

try this

sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev

it solved my problem

Share:
26,764
Jackyto
Author by

Jackyto

- Android and Bitcoin enthusiast - French food and wine lover

Updated on May 27, 2020

Comments

  • Jackyto
    Jackyto almost 4 years

    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?