2014年7月8日火曜日

Android: Gen already exists but is not a source folder

Error info:
Gen already exists but is not a source folder.

Workaround-1:
1. Right click project, and select "Properties"
2. Select "Java Build Path"
3. Open "Source"
4. Click "Add Folder..."
5. Select "gen", click "OK", Click "YES",and click "OK"
6. Right click project, select "Android Tools"-->"Fix Project Properties"

Workaround-2:
This error's root cause is classpath issue,and look likes following format.
-----------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
-----------------------------------------------
You can modify this file's following tags:
------------------------------
kind="src"
kind="con"
kind="lib"
kind="output"
-------------------------------------------------