I am developing my Android project, After I removed a unused library, I got the error:
myproject/gen already exists but is not a source fold
My solution was to paste the following into the .classpath file:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
I had some of the same symptoms, but solved it differently:
I found out that I had two files in the drawable dir that were conflicting: icon.png and icon.xcf. This made R fail generation. I moved the icon.xcf out of the way and R generated and the project compiled.
I met the same problem, solved it as following:
In Package Explorer, right-click the gen folder, find "Build Path - Use as Source Folder" and click it.
That is it. I hope it will help.
Solution :
Step 1 :
Step 2 :
Final
Build Project(s)
Happy Coder :)
The gen folder is where ADT creates the R.java file, which specifies your resource definitions. i.e. your resources (colours, dimensions, layouts, etc) are converted to code, and placed in R.java in the gen folder.
So when you build the app you need to ensure the gen folder is treated as a source code folder by your IDE, as it contains the R class.
In your IDE, you need to mark the gen folder as a source folder, so its content are built alongside your source.
Your acceptance rate is very low. If you want people to help you, you need a high acceptance rate.