有人有类似的问题吗,我导入android项目,我得到 这样的错误

[2011-10-03 17:20:09 - Screen] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2011-10-03 17:21:55 - App] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2011-10-03 17:21:59 - App] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.

我得到错误删除所有@覆盖上面的函数。我有Windows 7 x64, jvm7 x64。(我做了Android工具->修复项目属性,但没有帮助)


当前回答

正在做的项目->清洁…帮我修好了。

我的eclipse已经停止工作,所以我清理了工作空间目录,当我导入项目时运行eclipse后,我遇到了这个问题。这里建议的其他解决方案都不起作用。

其他回答

跟随对我很有用

Enable project-specific settings and set the compliance level to 1.6

你怎么能这样做?

在Eclipse Package Explorer 3中单击项目并选择属性。属性窗口将打开。在窗口的左面板上选择Java Compiler。现在启用项目特定的设置,并将compiler遵从性级别设置为1.6。选择Apply,然后选择OK。

我建议你检查jar文件是否正确地包含在你的项目中。有可能在没有jar文件的情况下,项目将无法编译

我通过以下两种方法解决了这个问题:

在Eclipse->“项目”菜单->“Java Compiler”->设置“Compiler compliance level”= 1.6 检查“使用默认合规设置” 设置'Generated .class compatibility' = 1.6 设置'Source compatibility ' = 1.6 然后进入“Windows”菜单—>“Preferences”—>“Java”,展开“Java”—>“Compiler”—>设置“Compiler compliance level”= 1.6

提示:源兼容性必须等于或小于遵从级别。

Go to the project folder and right click on it -> properties -> check off the read only box and click ok Right-click on your project and select "Android Tools -> Fix Project Properties" Right-click on your project and select "Properties -> Java Compiler", check "Enable project specific settings" and select 1.5 or 1.6 from "Compiler compliance settings" select box. (try all the levels one by one just in case) Under Window -> Preferences -> Java -> Compiler, set Compiler compliance level to 1.6 or 1.5.

希望这能解决问题。

这不是问题所在,杰克。Android SDK不是x64,但可以与x64 jvm(和x64 eclipse IDE)一起工作。

正如helios所说,您必须将项目兼容性设置为Java 5.0或Java 6.0。

要做到这一点,有两个选项:

右键单击项目,选择“Android Tools -> Fix” 项目属性”(如果这不起作用,请尝试第二种选择) 右键单击项目并选择“属性-> Java” 编译器”,勾选“启用项目特定设置”并选择 从“编译器遵从性设置”选择框中选择1.5或1.6。