Gen already exists but is not a source folder

Source: Internet
Author: User

Errors such as repeated empty packages during Android project import are often related to the imported Java compilation level. Click Project Properties>

Java compiler-> modifying compiler compliance level is generally 1.6.

After the clean project is modified, you will often encounter:

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

 

 

Solution to this problem:

1. Right-click the project and select "properties"

2. Select "Java build path" on the left"

3. Open the "Source" tab.

4. Click "add folder ..."

5. Check the "gen" folder, click OK, click yes, and then click OK.

6. Right-click the project and select "Fix Project Properties" in "andriod Tools"

 

The cause of this problem is that the classpath file has an error. This file exists in the root directory of the project, which is automatically generated by eclipse. It defines the $ classpath that your project uses during compilation, generally, manual configuration is not required. If an error occurs, you can also manually modify it:

 

 

XML Code
  1. <? XML version = "1.0" encoding = "UTF-8"?>
  2. <Classpath>
  3. <Classpathentry kind = "src" Path = "src"/>
  4. <Classpathentry kind = "src" Path = "gen"/>
  5. <Classpathentry kind = "con" Path = "com. Android. Ide. Eclipse. ADT. android_framework"/>
  6. <Classpathentry kind = "con" Path = "com. Android. Ide. Eclipse. ADT. Libraries"/>
  7. <Classpathentry kind = "lib" Path = "libs/ksoap2-android-assembly-2.5.8-jar-with-dependencies.jar"/>
  8. <Classpathentry kind = "output" Path = "bin/classes"/>
  9. </Classpath>

 

 

From the data, we can easily see that the dependency file of the project is described above:

Location of the source file (kind = "src ")

Running System Environment (kind = "con ")

Location Information of the project library (kind = "lib ")

Project output directory (kind = "output ")

From: http://yxwang0615.iteye.com/blog/1849965

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.