Skip to content Skip to sidebar Skip to footer

Missing Package In Gen Folder With R In Android

I have a problem with R in android. I have a project with some packages. I changed the name of one package. I saw that the package with the same name was in 'gen' folder. When I ch

Solution 1:

So i think this is answer

Eclipse sometimes likes to add an "import android.R" statement at the top of your files that use resources, especially when you ask eclipse to sort or otherwise manage imports. This will cause your make to break. Look out for these erroneous import statements and delete them.

Reference.

And try to clean your project and if you have

import android.R;

remove this line and clean it again.

Solution 2:

Solution 3:

Remove this import from your code if it is there.

import android.R;

Clean your project and rebuild the solution again.

Solution 4:

If it isn't what the two other answers are, I've had a similar problem that related to me having an error in one of my XML files. Since the XML file has an error, eclipse fails to build your project. A failed build somehow messes up the path to the R.java file. So if you clean up your XML files and build the project, it should fix itself.

Post a Comment for "Missing Package In Gen Folder With R In Android"