Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11640

Android build fails with JDK 7 -- needs JDK 8

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Implemented
    • 6.3.0
    • None
    • cordova-android
    • None
    • OS: Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux

      Cordova: 6.3.0

      Cordova Android: 5.2.1

    Description

      Android platform documentation says JDK 7 or later.

      http://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html

      In fact, the default/sample project build throws a java.lang.UnsupportedClassVersionError in :transformClassesWithDexForDebug.

      -->>
      Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
      <<--

      When I change to JDK 8, the problem goes away and everything seems OK. (I only tested this with OpenJDK, but suspect it will be the same for Oracle Java.)

      If you decide to fix this by changing the docs, be aware that the JDK download link you currently provide offers only JDK 7 downloads.

      Attachments

        Issue Links

          Activity

            People

              bowserj Joey Robert Bowser
              caneff Andrew Neff
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: