Solved Including QML Modules for Android, issue with QtQml.Models and QtQuick.Dialogs
-
Hello,
I'm deploying my app for a test on a android phone, and my app crashes on startup because of module not installed.
After connecting to adb logcat I can see that there is a few modules not installed. I tried searching a bit for the need on including modules manually, but I do not find much other than on the ones we create ourself. Except one other, where it was solved by copying all qml files from Qt/version/android/qml to the workdirectory, which i tried but it did not have any effect.
The top of my main.qml is;
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.3 import QtQml.Models 2.1 import QtQuick.Layouts 1.3 import QtQuick.Controls 2.0 import QtQuick.Dialogs 1.0 import serverData 1.0
So it seems to find almost every module..
logcat extract
05-07 09:10:09.930 14104 14119 W HadEM : QQmlApplicationEngine failed to load component 05-07 09:10:09.931 14104 14119 W HadEM : qrc:/main.qml:7 module "QtQuick.Dialogs" is not installed 05-07 09:10:09.931 14104 14119 W HadEM : qrc:/main.qml:4 module "QtQml.Models" is not installed 05-07 09:10:09.931 14104 14119 W HadEM : qrc:/main.qml:7 module "QtQuick.Dialogs" is not installed 05-07 09:10:09.931 14104 14119 W HadEM : qrc:/main.qml:4 module "QtQml.Models" is not installed 05-07 09:10:09.931 14104 14119 W HadEM : 05-07 09:10:09.940 14104 14119 W HadEM : exit app 0
And the only thing noticable in the compile output while building is this,
Warning: QML import could not be resolved in any of the import paths: serverData Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Fusion.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Fusion.impl
But that output is not about any of the missing modules.. So I do not get it..
Have I included qml modules from or to the wrong directory?
Do I need to add any rules to the pro file?
Anyone have any tips? -
Moved everything over to my mac instead of building and deploying with linux through virtualenv, much easier to debug etc.
Seems like there just is a few qml modules that is not supported, like a filedialog..QtQml.Models seems to be supported when building the same environment through mac though :)
-
Moved everything over to my mac instead of building and deploying with linux through virtualenv, much easier to debug etc.
Seems like there just is a few qml modules that is not supported, like a filedialog..QtQml.Models seems to be supported when building the same environment through mac though :)