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

Can't deploy to Android emulator with JDK 21

    XMLWordPrintable

Details

    • 2023wk48FOQtforAndroid, 2024wk14FOQtforAndroid

    Description

      Copied from Teams:

      I'm trying to test something out on an android emulator, but I'm running into this error:

      > Task :dexBuilderDebug FAILED
      ERROR:/home/mitch/dev/temp/quick-Android_Qt_6_6_0_Clang_x86_64-Debug/android-build/build/intermediates/javac/debug/classes/org/qtproject/qt/android/bindings/QtLoader$2.class: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
      ERROR:/home/mitch/dev/temp/quick-Android_Qt_6_6_0_Clang_x86_64-Debug/android-build/build/intermediates/javac/debug/classes/org/qtproject/qt/android/bindings/QtLoader$1.class: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
      
      host os: kubuntu 22.04
      kit: "Android Qt 6.6.0 Clang x86_64"
      jdk: jdk-21.0.1
      ndk: 25.1.8937393
      sdk: 11.0 (31) (according to Creator's "Devices" settings)
      

      My first attempt to deploy to the emulator failed, something about android.corex something something depending on SDK 33, so I installed that too, and that's what the emulator uses. the CPU architecture for the emulator is x86_64.

      Using JDK 17 works.

      Attachments

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

        Activity

          People

            qtandroidteam Qt Android Team
            mitch_curtis Mitch Curtis
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes