Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-23826

Android: Build fails using build tools higher than 24.0 and Java 1.7

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 6.0.0
    • Fix Version/s: Release 6.2.0
    • Component/s: Android, CLI, Tooling
    • Labels:
    • Environment:

      Windows 10 Pro
      Appc CLI: 6.0.0-31
      Appc NPM: 4.2.8-5
      Ti SDK: 6.0.0.v20160825000249
      Android SDK Build-tools: 24.0.2
      Android SDK Platform-tools: 24.0.2
      Android SDK Tools: 25.1.7
      Java 1.7.0_80

    • Story Points:
      1
    • Sprint:
      2017 Sprint 02 Tooling

      Description

      Description

      When building with Android SDK Build-tools > 24.0 and Java < 1.8 the dexer step in the build process bombs out with the below, these build tools seem to require 1.8 link

      [ERROR] Failed to run dexer:
      [ERROR]
      [ERROR] java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
      [ERROR]         at java.lang.ClassLoader.defineClass1(Native Method)
      [ERROR]         at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
      [ERROR]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      [ERROR]         at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
      [ERROR]         at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
      [ERROR]         at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
      [ERROR]         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      [ERROR]         at java.security.AccessController.doPrivileged(Native Method)
      [ERROR]         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      [ERROR]         at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      [ERROR]         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      [ERROR]         at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      [ERROR]         at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
      [ERROR] Exception in thread "main"
      

      WORKAROUND

      Install Java 1.8

      Steps to reproduce
      1. Install Android SDK Build-tools > 24.0 and a Java version < 1.7
      2. Build for Android
      Actual result

      Build will fail with the error above

      Expected result

      Some help for the user in clarifying what's wrong

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmathews Gary Mathews
                Reporter:
                eharris Ewan Harris
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-10051
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code