Gen already exists but is not a source folder. convert to a source folder or rename it.

Source: Internet
Author: User
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
  1. <? XML version = "1.0" encoding = "UTF-8"?>
  2. <Classpath>
  3. <Classpathentry kind = "src" Path = "src"/>
  4. <Classpathentry kind = "src" Path = "gen"/>
  5. <Classpathentry exported = "true" kind = "con" Path = "com. Android. Ide. Eclipse. ADT. android_framework"/>
  6. <Classpathentry exported = "true" kind = "con" Path = "com. Android. Ide. Eclipse. ADT. Libraries"/>
  7. <Classpathentry exported = "true" kind = "con" Path = "com. Android. Ide. Eclipse. ADT. dependencies"/>
  8. <Classpathentry exported = "true" kind = "lib" Path = "libs/android-support-v4.jar"/>
  9. <Classpathentry exported = "true" kind = "lib" Path = "libs/gson-2.2.4.jar"/>
  10. <Classpathentry exported = "true" kind = "lib" Path = "libs/umeng_sdk.jar"/>
  11. <Classpathentry kind = "output" Path = "bin/classes"/>
  12. </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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.