gen already exists but is not a source folder
遇到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,一般不需要手动配置。如果出错,也可手动修改:
- <?xml version="1.0" encoding="UTF-8"?>
- <classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="gen"/>
- <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
- <classpathentry kind="lib" path="libs/ksoap2-android-assembly-2.5.8-jar-with-dependencies.jar"/>
- <classpathentry kind="output" path="bin/classes"/>
- </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的更多相关文章
- 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. 错误原因 ...
- 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 ...
- gen already exists but is not a source folder ZT
解决方法:1. 右键点击工程,选择 "Properties"2. 选择左边的 "Java Build Path" 3. 打开 "Source" ...
- …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 ...
- 导入别人的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 ...
- 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 ...
- 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 & ...
- Convert to a source folder or rename it.
从GitHub上恢复之前的版本 eclipse 报错: Convert to a source folder or rename it. 网上找了答案 : 找到了这个 1. 删除gen文件. 2.选 ...
- eclipse的package, folder, source folder 异同以及相互转化
1 相同点:都是文件夹; 不同点: 我们用面对对象思维来看; 首先说folder, 三者的父类(object),就是普通的文件夹,它和我们window下面使用的文件夹没有任何区别; source fo ...
随机推荐
- 多线程-栅栏CyclicBarrier
上一篇总结了闭锁CountDownLatch,这一篇总结一下栅栏CyclicBarrier.它们两者之间的区别主要是,闭锁是等待一个事件发生,比如上一篇的田径比赛,运动员等待裁判哨声一响就可以开始跑, ...
- JMS-activeMq点对点模式
上一篇对JMS进行介绍了一下,接下来总结一下activemq点对点模式以及订阅发布模式. (1)下载:首先到官网http://activemq.apache.org下载activemq (2)运行:解 ...
- vue-cli 一分钟搭建自己的vue项目
创建项目 1.安装全局vue-cli npm install vue-cli -g 2.生成项目模板(my_projuct为项目名称) vue init webpack my_projuct 3.进入 ...
- scala学习手记25 - Curry化
curry翻译为中文就是咖喱.意为使用curry可以让代码更有味道. scala里的curry化可以把函数从接收多个参数转换成接收多个参数列表.也就是说我们要编写的函数不是只有一个参数列表,这个参数列 ...
- Spring获取bean的几种方式
工作中需要对一个原本加载属性文件的工具类修改成对数据库的操作当然,ado层已经写好,但是需要从Spring中获取bean,然而,工具类并没有交给Spring来管理,所以需要通过方法获取所需要的bean ...
- Selenium with Python 008 - WebDriver 元素等待
如今大多数Web应用程序使用Ajax技术,当浏览器在加载页面时,页面上的元素可能并不是同时被加载完成的,这给元素的定位增加了困难.如果因为在加载某个元素时延迟而造成ElementNotVisibleE ...
- Codeforces Round #299 (Div. 2)D. Tavas and Malekas
KMP,先预处理按每个节点标记,扫一遍更新每个匹配位置,最后kmp判断是否有重合而且不相同的地方 注意处理细节,很容易runtime error #include<map> #includ ...
- 用临时用户数据目录启动Chrome,关闭安全检查等(解决Cross origin requests are only supported for HTTP?)
Cross origin requests are only supported for HTTP? 参考:https://www.zhihu.com/question/20948649 批处理: s ...
- N!含有多少个 2/5质因子
编程之美127页,N!中含有质因数2的个数 = [N/2] + [N/4] + [N/8] + [N/16] + ..... 要理解上式,先看 编程之美126页,N!中含有质因数5的个数Z 举例:N ...
- Redis 命令,键(key),字符串(String),哈希(Hash),列表(List),集合(Set)(二)
Redis 命令 Redis 命令用于在 redis 服务上执行操作. 要在 redis 服务上执行命令需要一个 redis 客户端.Redis 客户端在我们之前下载的的 redis 的安装包中. ...