在 Eclipse 中打开以前的 android 项目时出错
我需要在 Eclipse 中打开以前开发的 Android 应用程序。该应用程序有针对 Android 1.6
目标的开发人员。当我将项目导入 Eclipse IDE 时,出现以下错误。
Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
之后:右键单击项目 -> Android工具->修复项目属性
我仍然无法打开该项目。有没有人以前经历过这种情况或者有任何想法来摆脱这个错误。
感谢提前。
I need to open a previousely developed android application in Eclipse. The application has developper for the Android 1.6
target. When I import the project to the eclipse IDE it gives the following error.
Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
After that:Right click the the Project -> Android tools -> Fix project properties
Still I can't open the project. Does any one have experience this before or have any idea to get rid of this error.
Thans inadvance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于 Android,您应该使用 JDK 1.5 (5.0) 或 1.6 (6.0)。在您的情况下,您使用 JDK 1.7,并且 Android 会抛出有关此的错误。
For Android you should use JDK 1.5 (5.0) or 1.6 (6.0). In your case you use JDK 1.7, and Android throws error about this.
首先确保您的机器上必须安装 android 1.6。其次,如果您没有下载并安装,则必须有java编译器5.0或6.0。
因此设置适当的java编译器进行编译。
为了做到这一点-->右键单击项目->属性->java编译器。
您还可以通过--> 更改项目的构建目标右键单击项目->属性->Android
First make sure that android 1.6 must be installed on your machine. Secondly java compiler 5.0 or 6.0 must be there if you not have download and installed.
So Set the appropriate java compiler for compilence.
For doing it--> Right click on project->properties->java compiler.
you can also change build target for the project by--> Right click on project->properties->Android
我认为您输入了错误的 Java 版本,您要求输入 1.7(不是某些人提到的 Java 7),而它至少需要 Java 5。
因此,请尝试将版本从 1.7 更改为 7 或您拥有的版本。
我认为这是在清单文件中完成的
I think you have entered a wrong Java version, you asked for 1.7 (which is not Java 7 as some are referring) when it requires at least Java 5.
So try to change the version from 1.7 to 7 or to the one you have.
This is done in the manifest file I think