Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Rules for qmlimportscanner / androiddeployqt

Rules for qmlimportscanner / androiddeployqt

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 3 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    benpartwear.ch
    wrote on last edited by
    #1

    When deploying a C++ and QML application from QtCreator to android, androiddeployqt uses qmlimportscan to determine the QML dependencies (like QtQuick Controls) and includes them in the APK, in the folder "assets/--Added-by-androiddeployqt--". My own QML files reside in a folder higher than the Qt Project but are added to the .pro file as sources. Up to Qt 5.3 this worked fine, starting with Qt 5.4 QML dependency resolution fails silently. It does work when i add a dummy qml file to the project with the import statements and add it to the same folder as the .pro file.

    Do the Qml files have to reside in the project directory for qmlimportscan to work? Where can i find more documentation on the tool? In what other way could i tell androiddeployqt what qml files to include?

    1 Reply Last reply
    2
    • TalklessT Offline
      TalklessT Offline
      Talkless
      wrote on last edited by Talkless
      #2

      I have same problem with Qt 5.6.1. I have someLib.pri that has .qrc with QML files outside of main .pro project directory, and qmlimportscanner it fails with error like this:

        -- Adding '/home/myuser/code/MainAppProject/res/qml/main.qml/qrc:/res/qml/SomeLib/SomeQmlComponent' as QML dependency
          -- Skipping because file does not exist.
      

      EDIT:
      Bug report already exists: https://bugreports.qt.io/browse/QTBUG-55259

      1 Reply Last reply
      0
      • timdayT Offline
        timdayT Offline
        timday
        wrote on last edited by
        #3

        I've run into deployment import-scanning issues enough times that personally I've just got in the habit of creating a hopefully "obvious" imports.qml with all the import statements for everything I think my application uses.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved