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

QQmlApplicationEngine failed to load component when using subdirs template + Android/iOS

    XMLWordPrintable

Details

    • Android, iOS/tvOS/watchOS

    Description

      When using the subdirs template structure, a deployment bug is encountered for Android and iOS virtual and physical devices. This will always result in one or more of missing QtQuick modules with the following error:

      D EGL_emulation: eglMakeCurrent: 0xa3fbd960: ver 3 1 (tinfo 0xa3b94c80)
      W libapp.so: QQmlApplicationEngine failed to load component
      W libapp.so: qrc:/main.qml:2 module "QtQuick.Controls" is not installed
      W libapp.so: qrc:/main.qml:1 module "QtQuick" is not installed
      W libapp.so: qrc:/main.qml:2 module "QtQuick.Controls" is not installed
      W libapp.so: qrc:/main.qml:1 module "QtQuick" is not installed
      06-13 10:05:26.685 9127 9154 W libapp.so:
      W libapp.so: exit app 0
      D EGL_emulation: eglMakeCurrent: 0xa3fbd960: ver 3 1 (tinfo 0xa3b94c80)

      "org.qtproject.example.app" died.

      Desktop deployments for all platforms do not experience this issue. This bug effectively renders the subdirs template build type useless for cross platform/device projects. The only known remedy is to remove the subdirs template structure and use a flat structure.

      To reproduce the error, I created two identical qml projects with no third-party dependencies. The code includes one class that has a method that prints to stdout. The flat version works on all platforms as expected. The subdirs template version makes a static lib out of the foo class and links it into the final application. It fails on mobile as expected. Attached are the two proof of concept projects.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            tindall-sbrown Stephen Brown
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes