遇到android项目导入出现后重复空包等错误,往往是导入的java编译级别有关,点击项目properties->

java Compiler ->修改Compiler compliance level 一般是1.6。

修改完成clean项目之后,往往还会遇到:

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,一般不需要手动配置。如果出错,也可手动修改:

  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")

摘自:http://yxwang0615.iteye.com/blog/1849965

gen already exists but is not a source folder的更多相关文章

  1. gen already exists but is not a source folder. Convert to a source folder or rename it.

    异常提示: gen already exists but is not a source folder. Convert to a source folder or rename it.   错误原因 ...

  2. Eclipse.Error.gen already exists but is not a source folder.

    在Eclipse ADT来开发Android App时会遇到以下问题:"myproject/gen already exists but is not a source folder. Co ...

  3. gen already exists but is not a source folder ZT

    解决方法:1. 右键点击工程,选择 "Properties"2. 选择左边的 "Java Build Path" 3. 打开 "Source" ...

  4. …gen already exists but is not a source folder. Convert to a source folder or rename it [closed]

    Right click on the project and go to "Properties" Select "Java Build Path" on th ...

  5. 导入别人的Android项目,提示 /Libs/gen already exists but is not a source folder. Convert to a source folder or rename it

    解决方法: 遇到这个问题的解决方法: 1. 右键点击工程,选择 "Properties" 2. 选择左边的 "Java Build Path" 3. 打开 &q ...

  6. gen already exists but is not a source folder. Convert to a source folder or rename it 的解决办法

    1. Right click on the project and go to "Properties" //鼠标右键点击项目,然后选中Properties   2. Select ...

  7. Eclipse --Type /com.xx.app/gen already exists but is not a source folde解决方案

    两种解决方案: Two actions, first: 1.Right click on the project and go to "Properties" 2.Select & ...

  8. Convert to a source folder or rename it.

    从GitHub上恢复之前的版本  eclipse 报错: Convert to a source folder or rename it. 网上找了答案 : 找到了这个 1. 删除gen文件. 2.选 ...

  9. eclipse的package, folder, source folder 异同以及相互转化

    1 相同点:都是文件夹; 不同点: 我们用面对对象思维来看; 首先说folder, 三者的父类(object),就是普通的文件夹,它和我们window下面使用的文件夹没有任何区别; source fo ...

随机推荐

  1. [UOJ210]寻找罪犯

    2-sat神题.. 告诉是2-sat我也完全想不到正解. 看了看题解其实一步步分析也不算很难 这个题首先是要围绕每个人是否是犯人和每句话是否是真话来思考 首先要明确的是: 1.好人不说谎话 2.说了谎 ...

  2. import和import static的区别

    import static静态导入是JDK1.5中的新特性. 一般我们导入一个类都用 import 包名.类名; 而静态导入是这样:import static 包名.类名.*; 这里的多了个stati ...

  3. 金中半日baoling游-----stoi

    蒟蒻又来水博客了,写个游记啦啦啦啦,好像是第一篇游记咯. 温馨提示:愚人节写的博客看了后会变棒棒哦!(麻麻再也不用担心我被骗) 进入正题 3月31日早6:30左右起床了,然后就是....(此处可省略) ...

  4. NFV及vIMS的部署实施

    随着5G和物联网等领域的快速发展,移动数据业务飞速增长,而传统电信网络基于专用硬件的架构和封闭式的网元,已经成为运营商拓展新业务的严重障碍.NFV能够根据用户和业务需求灵活动态地进行网络资源配置,实现 ...

  5. 入门教程:.NET开源OpenID Connect 和OAuth解决方案IdentityServer v3 创建简单的OAuth2.0服务器,客户端和API(三)

    本教程的目的在于创造尽可能简单的identityserver安装作为一个oauth2授权服务器.这应该能够让你了解一些基本功能和配置选项(完整的源代码可以发现在这里).在后面的文档中会介绍更多的高级功 ...

  6. SSL和SSH的区别

    SSL是一种国际标准的加密及身份认证通信协议,您用的浏览器就支持此协议.SSL(Secure Sockets Layer)最初是由美国Netscape公司研究出来的,后来成为了Internet网上安全 ...

  7. 如何在 CentOS7 中安装 Nodejs

    一.安装Nodejs 安装版本:10.13.0 1.安装必要的编译软件包 yum -y install gcc gcc-c++ 2.从源码下载Nodejs cd /usr/local/src wget ...

  8. springboot打Jar包和War包

    一:打JAR包 在工程的pom.xml中添加以下依赖 <build> <plugins> <plugin> <groupId>org.springfra ...

  9. sha1加密

    SHA-1是一种数据加密算法,该算法的思维是接纳一段明文,然后以一种不可逆的方式将它转换成一段(一般更小)密文, 也能够简略的理解为取一串输入码(称为预映射或信息),并把它们转化为长度较短.位数固定的 ...

  10. MySQL连接中出现大量的 init 状态问题

    最怕的就是睡一觉醒来,系统出了问题. 大早系统无法登陆,以前没有经验的同学code的代码,竟然 try catch 没有记录异常日志信息. 查的问题一点头绪都没有,一直锁定在公司公共网关接口出了问题. ...