Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Could not load qml file on Deployment on Android Device



  • I have issue related to loading 1-2 qml files at the time of deployment. I have a code that runs well on emulator but does not load few qml file at the time of delpoyment. For example

    this is my model and on itemClick want to load new qml

    @ListModel {    
     ListElement { name: "Help"; section: "Other";         path:      "settingsHelp.qml"; }
    }@
    

    in Delegate I am loading this qml file like this

    @ help_stack.push(Qt.createComponent(Qt.resolvedUrl(path), help_stack));@

    Just for info, this seetingsHelp.qml exists in same folder

    This code working perfectly on emulator and I have all the deployment setting in place in .pro file such as DEPLOYMENTFOLDERS and qtcAddDeployment. In Addition, I have different qml pages too which are working fine on Deployment so it means deployment setting are fine too I guess.

    Regarding error there is no specific error on logs except one on screen

    @Error: Could not load: file://data/data/com.test.example/files/assets:/qml/help/settingsHelp.qml:-1 File not found@
    

    Any idea what could be problem



  • You can try adding the import path explicitely with QQmlEngine::addImportPath(assets:/...).
    Just to be sure.


Log in to reply