eclipse问题

gen already exists but is not a source folder. Convert to a source folder or rename it的错误。

 

 

遇到这个问题的解决方法:

 1. 右键点击工程,选择 "Properties"

2. 选择左边的 "Java Build Path" 

3. 打开 "Source" 标签面板

4. 点击 "Add Folder..."

5. 勾选 "gen" 文件夹,点击OK,点击YES,再点击OK

6. 最后右键点击工程,选择 "Andriod Tools" 里面的 "Fix Project Properties"

 

出现这个问题的原因是classpath文件出错,这个文件存在于项目根目录下,是eclipse自动生成的,它定义了你这个项目在编译时所使用的$CLASSPATH,一般不需要手动配置。如果出错,也可手动修改:

 

 

Xml代码   收藏代码
  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>  

 

 

从数据上我们容易看出,上面描述了工程的依赖文件:

源文件的具体位置(kind="src")

运行的系统环境(kind="con")

工程的library的具体位置信息(kind="lib")

项目的输出目录(kind="output")

猜你喜欢

转载自blog.csdn.net/u012049463/article/details/50681887