A
AC Question
Looks like android.jar (android L) is compiled using Java 7 and when I compile my java library that depends on android classes using lower version(Java 6) I get the warning and while running I get exception.
warning: android\app\Notification.class(android\app:Notification.class): major version 51 > is newer than 50, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
Exception in thread "main" java.lang.UnsupportedClassVersionError: android/app/Notification$Builder : Unsupported major.minor version 51.0 <br>
at java.lang.ClassLoader.defineClass1(Native Method)<br>
at java.lang.ClassLoader.defineClassCond(Unknown Source)<br>
at java.lang.ClassLoader.defineClass(Unknown Source)<br>
at java.security.SecureClassLoader.defineClass(Unknown Source)<br>
....
Should I use only Java 7 to compile (to avoid warning) and to run? Or Is it just that the preview jar is compiled with Java 7 and the final one will support Java 5/6 upwards?
warning: android\app\Notification.class(android\app:Notification.class): major version 51 > is newer than 50, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
Exception in thread "main" java.lang.UnsupportedClassVersionError: android/app/Notification$Builder : Unsupported major.minor version 51.0 <br>
at java.lang.ClassLoader.defineClass1(Native Method)<br>
at java.lang.ClassLoader.defineClassCond(Unknown Source)<br>
at java.lang.ClassLoader.defineClass(Unknown Source)<br>
at java.security.SecureClassLoader.defineClass(Unknown Source)<br>
....
Should I use only Java 7 to compile (to avoid warning) and to run? Or Is it just that the preview jar is compiled with Java 7 and the final one will support Java 5/6 upwards?