Exception prompt: Gen already exists but is not a source folder. convert to a source folder or rename it. error cause: I encountered this exception when importing a previous project. the classpath file (this file cannot be viewed and edited in eclipse and must be viewed and edited in the file browser) fails, causing eclipse to not recognize my SRC code folder, you need to specify the folder where the source code is located by setting. Solution: Right-click the project, select Properties -- Java build path -- source -- add folder..., select the SRC and gen directories of the project in the pop-up box, and click OK. As shown in: Of course, since there is an error in the. classpath file, we can also manually modify the. classpath file to fix this error. Next let's take a look at the normal. classpath file, as shown below:
[XML]View plaincopy
- <? XML version = "1.0" encoding = "UTF-8"?>
- <Classpath>
- <Classpathentry kind = "src" Path = "src"/>
- <Classpathentry kind = "src" Path = "gen"/>
- <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 exported = "true" kind = "con" Path = "com. Android. Ide. Eclipse. ADT. dependencies"/>
- <Classpathentry exported = "true" kind = "lib" Path = "libs/android-support-v4.jar"/>
- <Classpathentry exported = "true" kind = "lib" Path = "libs/gson-2.2.4.jar"/>
- <Classpathentry exported = "true" kind = "lib" Path = "libs/umeng_sdk.jar"/>
- <Classpathentry kind = "output" Path = "bin/classes"/>
- </Classpath>
Kind = "src" specifies the source code location kind = "con" specifies the current system environment kind = "lib" specifies the specific location of the library on which the project depends kind = "output" specifies the file generated by the project you only need to manually specify the source code location of SRC to fix this exception. From: http://blog.csdn.net/zhufuing/article/details/21086893
Gen already exists but is not a source folder. convert to a source folder or rename it.