Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-103846

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • 6.3.0
    • Build System: CMake
    • None
    • Linux/X11
    • change Tools/Options/JDK Location on 'java-11-openjdk-amd64'

    Description

      After upgrading Qt to 6.3.0, there was an error with 'gradle', namely, it requires java version 11, while SDK manager require exactly Java 1.8:

      Should 'java 11' be installed additionally? If so, where in the settings to point 'gradle' to use a different version of Java?

      Issues:

      :-1: error: FAILURE: Build failed with an exception.

      • Where:
        Build file '/qtprojects/Android630/build-Android630-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/android-build/build.gradle' line: 17
      • What went wrong:
        A problem occurred evaluating root project 'android-build'.
        > Failed to apply plugin 'com.android.internal.application'.

      :-1: error: > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
      You can try some of the following options:

      • changing the IDE settings.
      • changing the JAVA_HOME environment variable.
      • changing `org.gradle.java.home` in `gradle.properties`.
      • Try:
        > 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.

      BUILD FAILED in 15s

      :-1: error: Building the android package failed!
      – For more information, run this command with --verbose.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtbuildsystem Qt Build System Team
              linerfx John Dow
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes