在 Eclipse 中导入现有 Android 项目:没有 gen 源文件夹?

发布于 2024-10-22 11:03:45 字数 627 浏览 3 评论 0原文

我正在尝试将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

和影子一齐双人舞 2024-10-29 11:03:45
Package Explorer -> Right click the project -> "Android Tools" -> "Fix Project Properties"
Project -> Clean

无需重新启动 eclipse 即可修复

Package Explorer -> Right click the project -> "Android Tools" -> "Fix Project Properties"
Project -> Clean

Fixes without having to restart eclipse

抱猫软卧 2024-10-29 11:03:45
Android requires compiler compliance level 5.0. Please fix project properties.

我遇到了同样的问题,但这些答案都没有帮助我。我在此处找到了我的解决方案:

包资源管理器 ->右键单击
项目-> “Android工具”-> “使固定
项目属性”

Android requires compiler compliance level 5.0. Please fix project properties.

I had the same problem but non of these answers helped me. I found my solution here:

Package Explorer -> Right click the
project -> "Android Tools" -> "Fix
Project Properties"

热鲨 2024-10-29 11:03:45

我遇到了同样的问题,但通过以下方式解决了

Package Explorer -> Right click the project -> Properties -> Java Build Path -> Source -> your project name/gen -> click on Remove -> Click on Add Folder -> check gen -> Ok -> Ok    

I had the same problem but solved in the following way

Package Explorer -> Right click the project -> Properties -> Java Build Path -> Source -> your project name/gen -> click on Remove -> Click on Add Folder -> check gen -> Ok -> Ok    
灼疼热情 2024-10-29 11:03:45

只需右键单击并从 eclipse 中删除 gen 目录即可。如果没有,请尝试修复上面的项目属性。

Just right click and delete the gen directory from eclipse. If not, try the fix project properties above.

木森分化 2024-10-29 11:03:45

如果将现有项目导入工作区后,项目下缺少 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文