我如何使用,需要一个Android项目构建路径上的1.7遵从级别的Java项目?项目、如何使用、路径、级别

2023-09-07 23:10:33 作者:奥特曼打怪兽先生

我使用Eclipse。如果我改变主(Android版)项目的合规性水平从1.6到1.7,我得到一个错误:

I'm using Eclipse. If I change the compliance level of the main (Android) project from 1.6 to 1.7, I get an error:

Android的要求编译器遵从性级别5.0或6.0。找到1.7来代替。请使用Android工具>修复项目属性。

如果我改变库(Java)的项目的合规性水平为1.7〜1.6,在它很多code就会变为无效。

If I change the compliance level of the "library" (Java) project from 1.7 to 1.6, a lot of the code in it becomes invalid.

时经历的Java项目的code和固定这里每个错误我的单选项?

Is going through the code of the Java project and fixing every error my single option here?

推荐答案

谷歌刚刚发布的Eclipse ADT 22.6增加了对Java 7的语言特性的支持,的 http://developer.android.com/tool​​s/sdk/eclipse-adt.html 。一旦升级对插件的最新版本的编译器符合级别将包括1.7选项。

Google just released Eclipse ADT 22.6 which adds support for Java 7 language features, http://developer.android.com/tools/sdk/eclipse-adt.html. Once you upgrade to to the latest version of the plugin the Compiler compliance level will include the 1.7 option.