在 Eclipse 中导入现有 Android 项目:没有 gen 源文件夹?
我正在尝试将 android 项目导入 Eclipse(从 Git,但我认为它不相关),但我无法运行或编译它,因为我收到这些错误:
Android requires compiler compliance level 5.0. Please fix project properties. Serval-Video-Discovery line 1 Android ADT Problem
Project 'Serval-Video-Discovery' is missing required source folder: 'gen' Serval-Video-Discovery Build path Build Path Problem
我认为第一个项目并不是真正的大问题,即使我不太理解这个警告。
有趣的是,文件系统上存在“gen”文件夹;此外,我无法尝试创建它,因为它已经存在!
我应该怎么做才能解决这个问题?
这是我尝试导入的 GitHub 存储库: https://github.com/rbochet/Serval-Video-Discovery
I'm trying to import an android project into Eclipse (from Git, but I don't think it's relevant), and I can't run or compile it because I get these errors:
Android requires compiler compliance level 5.0. Please fix project properties. Serval-Video-Discovery line 1 Android ADT Problem
Project 'Serval-Video-Discovery' is missing required source folder: 'gen' Serval-Video-Discovery Build path Build Path Problem
I think the first one isn't really a big problem, even if I don't really understand the warning.
The funny thing is that the "gen" folder exists on the filesystem; furthermore, I can't try to create it because it already exists !
What should I do to solve this issue?
Here is the GitHub repo I'm trying to import from: https://github.com/rbochet/Serval-Video-Discovery
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
无需重新启动 eclipse 即可修复
Fixes without having to restart eclipse
我遇到了同样的问题,但这些答案都没有帮助我。我在此处找到了我的解决方案:
I had the same problem but non of these answers helped me. I found my solution here:
我遇到了同样的问题,但通过以下方式解决了
I had the same problem but solved in the following way
只需右键单击并从 eclipse 中删除 gen 目录即可。如果没有,请尝试修复上面的项目属性。
Just right click and delete the gen directory from eclipse. If not, try the fix project properties above.
如果将现有项目导入工作区后,项目下缺少 gen 文件夹,只需在项目下创建一个 gen 文件夹即可修复上述错误。
If gen folder is missing under project after importing an existing project into workplace, just create a gen folder under project and that will fix the above error.