Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.2, 5.12.3
-
None
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.