Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QML andoird app doesn't start cause QtQuick not installed
I'm developing a small Qt app using QML but I'm still unable to execute on android device. When the app start an error came up regarding QtQuick module (and all other qml module) are not installed and the app will close. I tried to make same operation by compiling and executing the quickcontrols2\gallery example and this run correctly. I compared the two apk generated and I found the only different is in the galley apk inside the internal folder assets\--Added-by-androiddeployqt--\ there is a folder named qml where inside are the files relative to the varisous control. In the apk generated by my project the qml folrder is missing. I don't know how to instruct qt creator to add this folder also in my project.
Someone experimented same porblem and have a solution?
BjoernK last edited by
I can only guess. I think you missed a line in your project file (.pro). If I'm not wrong there should be a line which looks like this:
QT += qml quick widgets sql
These are the modules to include.
Another reason could be a missing import in a .qml-file. Something like:
import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.1
Thank you for your reply. I forgot to specify the same project execute correctly under Windows that no import module seem missing...
Found the problem but not the solution. The problem is it seem Qt Creator scan the same folder where is the .pro file looking for some .qml file. If found create the import libs.xml file with the right information. In my project I have the qml files in a separate folder but included in the resource files. This mean it work on Desktop app but faild to create correct apk since no qml file was found in the same location of .pro.
Someone know a .pro params to force Qt Creator to look in some additional folder in looking qml files?