Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27780] Android: Hyperloop builds fail if JDK 12 or higher is installed

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2020-04-10T22:27:18.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.0.1
ComponentsAndroid, Hyperloop
Labelsandroid, build, hyperloop, jdk
ReporterJoshua Quick
AssigneeJoshua Quick
Created2020-02-26T04:28:28.000+0000
Updated2020-04-10T22:27:18.000+0000

Description

*Summary:* If you have JDK 12 or higher installed on your machine, then Titanium apps using the Hyperloop module will fail to build. *Steps to reproduce:*

Install JDK 12 or higher on your machine.

Build [hyperloop-example](https://github.com/appcelerator/hyperloop-examples) for Android.

Notice the build *fails* with the following error message.

[ERROR] hyperloop:generateMetabase: Failed to generated metabase: warning: [options] bootstrap class path not set in conjunction with -source 6
error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.
*Cause:* As of JDK 12, Oracle has dropped support for the Java 6 language. https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8028563 Hyperloop currently hardcodes its usage of the javac command line tool during the build to Java 1.6, which is why it fails when using the newest JDK. [android/hooks/metabase/metabase.js#L41](https://github.com/appcelerator/hyperloop.next/blob/24feb99f719da5e3df279452526638d46fa0043a/android/hooks/metabase/metabase.js#L41) *Solution:* Update javac usage to use Java 1.8 instead. *Note:* For JDK 13 support, we'll likely need to update Titanium's gradle template to 6.x.x as well, which means updating our Android build tools to 3.6.x via [TIMOB-27778].

Comments

  1. Joshua Quick 2020-02-29

    PR (hyperloop.next): https://github.com/appcelerator/hyperloop.next/pull/336 PR (master): https://github.com/appcelerator/titanium_mobile/pull/11507 PR (9.0.x): https://github.com/appcelerator/titanium_mobile/pull/11510
  2. Sohail Saddique 2020-03-20

  3. Lokesh Choudhary 2020-04-10

    Verified the fix with NDK 13.0.2 & SDK 9.0.1.v20200409133209. Closing.

JSON Source