Android工程gen already exists but is not a source folder. Convert to a source folder or rename it问题的解决

错误内容:

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

此问题出现的原因主要是Build Path的问题。我在进行Git协作开发的时候删除了.classpath,导致问题的出现。解决方案如下:

  1. 右键项目Build Path->Configure Build Path…
  2. 选择Source标签,添加文件夹“Add Folder…”,选择gen和src文件夹,然后点”Apply”即可

这里写图片描述

注:开发环境,eclipse neon + android andmore

参考文献:

http://stackoverflow.com/questions/9532045/gen-already-exists-but-is-not-a-source-folder

发布了30 篇原创文章 · 获赞 17 · 访问量 21万+

猜你喜欢

转载自blog.csdn.net/llfjfz/article/details/53469119