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

App not starting on Android because of missing library/wrong library search path

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.2, 5.15
    • Fix Version/s: 5.15
    • Environment:
    • Platform/s:
      Android

      Description

      I recently updated an app of mine to use Qt 5.14.2 for deploying to Android. Before, I used to build individual APKs for the platforms I wanted to deploy to. After the update, I switched to building AAB files, as this also eases the deployment steps later on.

      When uploading the resulting AAB to the Play Store, it passes most pre-launch tests, however, it fails on one specific device (the Huawei P8 Lite) with the following errors printed via logcat (for reference, I attached the full log to this issue):

      04-23 22:53:10.095: W/OpenTodoList(19123): QQmlApplicationEngine failed to load component 
      04-23 22:53:10.095: W/OpenTodoList(19123): qrc:/main.qml:6:1: Type MainWindow unavailable 
      04-23 22:53:10.095: W/OpenTodoList(19123): qrc:/Windows/MainWindow.qml:5:1: plugin cannot be loaded for module "QtQuick.Controls.Material": Cannot load library /data/app/net.rpdev.opentodolist-1/lib/arm64/libqml_QtQuick_Controls.2_Material_qtquickcontrols2materialstyleplugin_arm64-v8a.so: (dlopen failed: library "_data_app_net.rpdev.opentodolist-1_lib_arm64_libqml_QtQuick_Controls.2_Material_qtquickcontrols2materialstyleplugin_arm64-v8a.so" not found)
      

      I downloaded the generated APK from the Play Store, and the file it complains about is indeed present. However, I think the offending part is the library search path:

      • According to the log it searches in /data/app/net.rpdev.opentodolist-1/lib/arm64/
      • However, looking into the generated APK it should be /data/app/net.rpdev.opentodolist-1/lib/arm64-v8a/

      If it helps, the app where this happens is open source and available on Gitlab: https://gitlab.com/rpdev/opentodolist

      Let me know if you need any additional information to better analyse this 

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              assam Assam Boudjelthia
              Reporter:
              mhoeher Martin Höher
              PM Owner:
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              RnD Owner:
              Rami Potinkara Rami Potinkara
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes