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

Android apps can no longer run on API level 21-22

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • 5.15.14
    • 5.15.12
    • QPA: Android
    • None
    • Android

    Description

      Qt 5 declares that it supports API level >= 21, this is also seen in qtbase/configure.pri:

              platform = $$eval(config.input.android-ndk-platform)
              isEmpty(platform): \
                  platform = android-21
      

      but the change https://code.qt.io/cgit/qt/qtbase.git/commit/src/android/jar/src/org/qtproject/qt5/android/QtLayout.java?h=v5.15.12-lts-lgpl&id=45b98e1ac708faa6c7e6f5bd26e23cc0e408b4e0 added method getRootWindowInsets() which is available only from API level 23, see android docs: https://developer.android.com/reference/android/view/View#getRootWindowInsets()

      Hence apps running on devices with API level < 23 crash on start:

      01-08 14:41:59.996 E/AndroidRuntime(10000): FATAL EXCEPTION: main
      01-08 14:41:59.996 E/AndroidRuntime(10000): Process: org.qtproject.example.qt_test_android, PID: 10000
      01-08 14:41:59.996 E/AndroidRuntime(10000): java.lang.NoSuchMethodError: org.qtproject.qt5.android.QtLayout.getRootWindowInsets
      01-08 14:41:59.996 E/AndroidRuntime(10000): 	at org.qtproject.qt5.android.QtLayout.onSizeChanged(QtLayout.java:129)
      01-08 14:41:59.996 E/AndroidRuntime(10000): 	at android.view.View.sizeChange(View.java:15864)
      ...
      

      Attachments

        Issue Links

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

          Activity

            People

              assam Assam Boudjelthia
              kambala Andrey Filipenkov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes