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

Android: Cannot build titanium project with JDK 1.9

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 7.1.0
    • Fix Version/s: Release 7.1.1
    • Component/s: Android
    • Labels:
      None
    • Environment:

      Mac OS 10.13.2, Win10Pro
      Appc CLI: 7.0.2
      Daemon: 1.0.1
      Node: 8.9.1
      JDK: 9.0.4
      Ti SDK: 7.0.2.GA, 7.1.0.v20180222153733

    • Story Points:
      3
    • Sprint:
      2018 Sprint 07 SDK

      Description

      When the system has only jdk 9 installed then the titanium project fails to build for android.

      Steps to Reproduce:
      1. Create a default alloy project
      2. build the project for android from command line "appc run -p android"

      Actual Result:
      The project does not build with following error:

      [ERROR] Failed to run dexer:
      [ERROR]
      [ERROR] Error: Could not create the Java Virtual Machine.
      [ERROR] Error: A fatal exception has occurred. Program will exit.
      

      Running dexer manually shows the error is actually the following, in the dexer args here we need to swap '-Djava.ext.dirs=' + this.androidInfo.sdk.platformTools.path, to '-classpath', this.androidInfo.sdk.platformTools.path, I don't believe we need to handle this on a per-version basis as Java 1.8 handles the -classpath arg just fine

      -Djava.ext.dirs=/Users/eharris/Library/Android/sdk/platform-tools is not supported.  Use -classpath instead.
      Error: Could not create the Java Virtual Machine.
      Error: A fatal exception has occurred. Program will exit.
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                eharris Ewan Harris
                Reporter:
                ssekhri Satyam Sekhri
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code