1. AC Question's Avatar
    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?
    07-26-2014 01:22 AM

Similar Threads

  1. Replies: 15
    Last Post: 07-29-2014, 03:11 PM
  2. OTA updates with unlocked bootloader and S-OFF?
    By rajpotula in forum HTC One Rooting, ROMs & Hacks
    Replies: 7
    Last Post: 07-28-2014, 08:14 AM
  3. How to set up my homepage with Nexus 5
    By skronk in forum Google Nexus 5
    Replies: 1
    Last Post: 07-26-2014, 01:37 AM