Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use a Java project that requires a 1.7 compliance level on an Android project build path?

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 requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.

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.

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

like image 733
NoToast Avatar asked Nov 12 '22 23:11

NoToast


1 Answers

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.

like image 165
Matt Accola Avatar answered Nov 14 '22 21:11

Matt Accola