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

Android: App/Module builds fail with JDK 14 as of 9.0.0

    Details

    • Story Points:
      5
    • Sprint:
      2020 Sprint 8, 2020 Sprint 9

      Description

      Summary:
      When building an app or module with Titanium 9.0.0, the build will fail if JDK 14 is installed.

      Titanium 8.3.x builds fine with JDK 14... except for Hyperloop builds: TIMOB-27780

      Steps to reproduce:

      1. Install JDK 14.
      2. Create a Titanium app project.
      3. Build with Titanium 9.0.1 for Android. (9.0.1 supports JDK 13.)

      Result:

      [ERROR] [GRADLE] 
      [ERROR] [GRADLE] FAILURE: Build failed with an exception.
      [ERROR] [GRADLE] 
      [ERROR] [GRADLE] * What went wrong:
      [ERROR] [GRADLE] Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
      [ERROR] [GRADLE] 
      [ERROR] [GRADLE] * Try:
      [ERROR] [GRADLE] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
      [ERROR] [GRADLE] 
      [ERROR] [GRADLE] * Get more help at https://help.gradle.org
      [ERROR] [GRADLE] 
      [ERROR] [GRADLE] BUILD FAILED in 597ms
      [ERROR] "gradlew" tool returned exit code: 1
      

      Cause:
      As of Titanium 9.0.0, we now build with gradle.
      We need to upgrade gradle to v6.3.0 which recently added JDK 14 support.
      https://docs.gradle.org/6.3/release-notes.html

      To-Do:
      In folder titanium_mobile/android, execute below command line to upgrade gradle wrapper files.

      ./gradlew wrapper --distribution-type all --gradle-version 6.3
      

      We should also update our com.android.tools.build:gradle tool to version 3.6.2 for files...
      https://github.com/appcelerator/titanium_mobile/blob/master/android/build.gradle
      https://github.com/appcelerator/titanium_mobile/blob/master/android/templates/build/root.build.gradle

      Note:
      You can have multiple JDK installations on Mac. You can list the JDK versions installed by entering the following at the command line.

      /usr/libexec/java_home -V
      

      You can select which installed JDK version to use by entering the following at the command line. You'll need to set the <JavaVersion> to what's installed, which the above command line will list. The below can be set in your .bash_profile file.

      export JAVA_HOME=$(/usr/libexec/java_home -v <JavaVersion>)
      

      Work-Around:
      Downgrade to JDK 13 for Titanium 9.0.1.
      Downgrade to JDK 12 for Titanium 9.0.0. (See TIMOB-27781)
      (JDK 8 is the min version needed.)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                jquick Joshua Quick
                Reviewer:
                Gary Mathews
                Tester:
                Satyam Sekhri
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration