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 ...
随机推荐
- Execute Disable Bit
“Execute Disable Bit”是Intel在新一代处理器中引入的一项功能,开启该功能后,可以防止病毒.蠕虫.木马等程序利用溢出.无限扩大等手法去破坏系统内存并取得系统的控制权.其工作原理是 ...
- MyCat配置和使用
1.什么是MyCat2.MyCat应用场景3.使用MyCat路由实现读写分离4.SpringBoot动态数据源切换原理5..SpringBoot项目实现读写分离 使用MyCat实现读写分离 什么是My ...
- HTTP与抓包
HTTP就是超文本传输协议,底层使用socket TCP长连接,基于请求与响应,是同步请求. socket 绝对多数语言都是支持socket的,底层走的是二进制传输. HTTP协议实际上是对Socke ...
- 谈谈RMQ问题
没用的话:好像好久没更博了,无聊就讲讲算法吧(主要找不到水题). 感觉针对初学者,老师教这个算法时没怎么懂,最近(大概1.2个月前吧)老师又教了lca(最近公共祖先,额,可以百度,我就不讲了,可能以后 ...
- Redis 后台运行
编辑配置文件 vim {redis_home}/redis.conf 修改daemonize (默认为no,修改为yes) 启动redis{redis_home}/src/redis-server ...
- Spring与CXF整合
1.首先引入CXF相关jar包以及spring相关jar包,因项目是maven项目,所以直接在pom.xml文件中引入以下依赖即可(以下只是CXF的依赖包,Spring的也要引入,相关的依赖参考我博客 ...
- Spring 静态注入讲解(MethodInvokingFactoryBean)
/* * Copyright (c) 2017 4PX Information Technology Co.,Ltd. All rights reserved. */package com.fpx.o ...
- angular 图片懒加载(延迟加载)
github 原文 https://github.com/Treri/me-lazyload me-lazyload angular 的图像资源延迟加载指令 例子(Demo) 演示网站(Demo Si ...
- TextView两种显示link的方法
TextView两种显示link的方法 一.简介 也是TextView显示文本控件两种方法 也是显示丰富的文本 二.方法 TextView两种显示link的方法 1)通过TextView里面的类ht ...
- python----异常处理(二)
格式如下: try: pass except Exception as e:#如果上面出错,执行下面代码 pass else:#try如果没出错执行此下面代码 pass fin ...