Eclipse does not generate class R

1

Lately I am not able to develop anything anymore, because ADT Eclipse is problematic, I have already downloaded several, on different computers and the error persists.

When creating any project smaller than 4.0, eclipse does not generate class R. Does anyone know what this can be? I already gave clean, checked the SDK, downloaded another ADT, installed almost everything in the SDK Manager, and nothing.

    
asked by anonymous 23.11.2014 / 03:52

3 answers

1

Are you using any library / project as a dependency on your project? Sometimes when there is an error with a dependency, the R class is not actually generated. A classic example is when you use the support library v7, which depends on v4 and you forget to put v4 as a dependency on v7. In this case, your project does not generate the R class because your project references features defined in the v4 support library but it can not find it.

If you are using the v7 compatibility library, make sure you followed all the steps shown on the Android Support Library Setup .

Follow the tutorial in "Adding libraries with resources" because as your problem is when generating the class R, you need the references to the resources of the libraries.

    
24.11.2014 / 03:54
0

This happens to me on Linux. One solution at the time I found was to switch distro or download the eclipse, not the adt, and install the plugin the old fashion!

Have you done this? If not, do the following: Download the Juno eclipse, go to Help - > Install New Software, on the Add button, put any name and in the field below, add this link, link . Check the options that appear, and install normally! Restart eclipse, create a project and comment here if it worked!

Good luck!

    
24.11.2014 / 01:24
0

I do not know if you could solve your problem, but breaking your head a little I found a way to circumvent this problem ...

I created in the new project, with version 4.0 and after it was created so the R Class is created normally, then I went into project properties and changed to 2.3.3 and it worked ...

I hope to have helped

    
25.02.2015 / 03:13