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. Android: module "xy" is not installed
Forum Updated to NodeBB v4.3 + New Features

Android: module "xy" is not installed

Scheduled Pinned Locked Moved Solved Mobile and Embedded
6 Posts 4 Posters 4.0k Views 2 Watching
  • 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.
  • P Offline
    P Offline
    Padlock
    wrote on last edited by
    #1

    Heya,

    Some time ago I started this thread but never got any reply:
    https://forum.qt.io/topic/89902/qqmlapplicationengine-failed-to-load-component-module-qtmultimedia-is-not-installed

    I keep having this issue with the declarative camera and now also with Shape {}.

    Qt 5.11 in the meantime, build platform is Windows for Android API level 22, x86, but using 25 and ARM for both API levels exposes the same error message. I got rid of the "Qt.labs.settings is not installed" error by removing any reference to it and working around it.

    Now I get module "QtQuick.Shapes" is not installed and module "QtMultimedia" is not installed only.

    I have entirely followed the documentation.

    In the QML:
    import QtQuick.Shapes 1.0
    import QtMultimedia 5.8

    In the .pro file:
    QT += multimedia

    The documentation doesn't say anything about Shape {}, hence I assume I don't need to add anything in the .pro file apart from what's already there:

    QT += quickcontrols2

    I can build and run the application on Windows and Linux, but I cannot run it on Android due to that error message when the QML in question is loaded (via Loader).

    When the verbose output of the Android deployment tool is turned on in QtCreator, I do get a multimedia molule added. I haven't tried or checked for Shape (yet) as I assume it to be the same issue as with QtMultimedia. I have also tried to include the .so files manually by utilising ANDROID_PACKAGE_SOURCE_DIR, but I don't think this is the problem here.

    The folder android-build\libs\x86 in my opinion contains the correct files:
    libQt5Multimedia.so
    libQt5MultimediaQuick.so
    libQt5Quick.so
    libQt5QuickControls2.so

    • lots of others.

    I can't see or find anything in the documentation I may have missed.

    Does anyone have an idea what might be wrong?

    I did an extensive search for these issues and even found several sources with the same problem. However, no solution has been provided anywhere. One source suggests the import version numbers might be wrong. I have tried several different version numbers by always entirely deleting the build directory beforehand, but to no avail. My current code contains what the documentation states but still no luck.

    One example is this one:
    https://bugreports.qt.io/browse/QTBUG-48047

    raven-worxR 1 Reply Last reply
    1
    • P Padlock

      Heya,

      Some time ago I started this thread but never got any reply:
      https://forum.qt.io/topic/89902/qqmlapplicationengine-failed-to-load-component-module-qtmultimedia-is-not-installed

      I keep having this issue with the declarative camera and now also with Shape {}.

      Qt 5.11 in the meantime, build platform is Windows for Android API level 22, x86, but using 25 and ARM for both API levels exposes the same error message. I got rid of the "Qt.labs.settings is not installed" error by removing any reference to it and working around it.

      Now I get module "QtQuick.Shapes" is not installed and module "QtMultimedia" is not installed only.

      I have entirely followed the documentation.

      In the QML:
      import QtQuick.Shapes 1.0
      import QtMultimedia 5.8

      In the .pro file:
      QT += multimedia

      The documentation doesn't say anything about Shape {}, hence I assume I don't need to add anything in the .pro file apart from what's already there:

      QT += quickcontrols2

      I can build and run the application on Windows and Linux, but I cannot run it on Android due to that error message when the QML in question is loaded (via Loader).

      When the verbose output of the Android deployment tool is turned on in QtCreator, I do get a multimedia molule added. I haven't tried or checked for Shape (yet) as I assume it to be the same issue as with QtMultimedia. I have also tried to include the .so files manually by utilising ANDROID_PACKAGE_SOURCE_DIR, but I don't think this is the problem here.

      The folder android-build\libs\x86 in my opinion contains the correct files:
      libQt5Multimedia.so
      libQt5MultimediaQuick.so
      libQt5Quick.so
      libQt5QuickControls2.so

      • lots of others.

      I can't see or find anything in the documentation I may have missed.

      Does anyone have an idea what might be wrong?

      I did an extensive search for these issues and even found several sources with the same problem. However, no solution has been provided anywhere. One source suggests the import version numbers might be wrong. I have tried several different version numbers by always entirely deleting the build directory beforehand, but to no avail. My current code contains what the documentation states but still no luck.

      One example is this one:
      https://bugreports.qt.io/browse/QTBUG-48047

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Padlock
      for the QML imports you do not have to change anything in your .pro file.
      The just need to be in one of the import paths.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Padlock
        wrote on last edited by
        #3

        I'm not sure I understand. How should I adjust the import paths manually?
        I thought the Android deployment tool checks the QML files for imports, does it not?

        1 Reply Last reply
        0
        • P Offline
          P Offline
          Padlock
          wrote on last edited by
          #4

          I've been able to identify the culprit about a week ago.

          The qmlimportscanner does not examine the .pro file to see what QML files are included in the project. It also doesn't care about what's in the.qrc file(s).

          Instead, it blindly adds the modules it can find by diving into the QML files in the folder where the .pro file resides, including subfolders. Any QML file above the directory that contains the .pro file is ignored.

          I created a simple .qml file in the same directory as the .pro file. Then I only added the import lines that are used within all my .qml files in other folders. Since this lead to a syntax complaint I also added the text Page {} after the last import line.

          import QtQuick 2.9
          import QtQuick.Layouts 1.3
          import QtQuick.Controls 2.4
          import QtQuick.Shapes 1.11
          import QtMultimedia 5.8
          import QtQuick.Window 2.11
          
          Page {
          }
          

          Note that this file is not referenced in the .pro file and is of course not part of the project/application at all. It only exists for the purpuse that qmlimportscanner includes the correct modules.

          M Julian Guarin 0J 2 Replies Last reply
          4
          • P Padlock

            I've been able to identify the culprit about a week ago.

            The qmlimportscanner does not examine the .pro file to see what QML files are included in the project. It also doesn't care about what's in the.qrc file(s).

            Instead, it blindly adds the modules it can find by diving into the QML files in the folder where the .pro file resides, including subfolders. Any QML file above the directory that contains the .pro file is ignored.

            I created a simple .qml file in the same directory as the .pro file. Then I only added the import lines that are used within all my .qml files in other folders. Since this lead to a syntax complaint I also added the text Page {} after the last import line.

            import QtQuick 2.9
            import QtQuick.Layouts 1.3
            import QtQuick.Controls 2.4
            import QtQuick.Shapes 1.11
            import QtMultimedia 5.8
            import QtQuick.Window 2.11
            
            Page {
            }
            

            Note that this file is not referenced in the .pro file and is of course not part of the project/application at all. It only exists for the purpuse that qmlimportscanner includes the correct modules.

            M Offline
            M Offline
            m3g1dd
            wrote on last edited by
            #5

            @Padlock said in Android: module "xy" is not installed:

            Instead, it blindly adds the modules it can find by diving into the QML files in the folder where the .pro file resides, including subfolders. Any QML file above the directory that contains the .pro file is ignored

            With your help, I created a symbolic link next to my project *.pro file to where my qml files reside, like below, it worked:

            $ ln -sv ../editorlib/qml/ qml
            qml -> ../editorlib/qml/
            

            Now I have:

            $ ls -lh
            total 32
            -rw-r--r--  1 aec  staff   253B Dec 11 13:18 deployment.pri
            -rw-r--r--  1 aec  staff   3.3K Dec 17 15:15 main.cpp
            lrwxr-xr-x  1 aec  staff    17B Dec 29 11:20 qml -> ../editorlib/qml/
            -rw-r--r--  1 aec  staff   1.4K Dec 29 10:54 standalone.pro
            

            After adding above symbolic link, qml import scanner can find QML dependencies with such messages:

            -- Appending dependency found by qmlimportscanner: /Users/aec/Qt5.11.3/5.11.3/android_armv7/qml/QtQuick/Extras/DelayButton.qml
                -- Appending dependency found by qmlimportscanner: /Users/aec/Qt5.11.3/5.11.3/android_armv7/qml/QtQuick/Extras/DelayButton.qmlc
                -- Appending dependency found by qmlimportscanner: /Users/aec/Qt5.11.3/5.11.3/android_armv7/qml/QtQuick/Extras/designer/CircularGaugeSpecifics.qml
                -- Appending dependency found by qmlimportscanner: /Users/aec/Qt5.11.3/5.11.3/android_armv7/qml/QtQuick/Extras/designer/CircularGaugeSpecifics.qmlc
                -- Appending dependency found by qmlimportscanner: /Users/aec/Qt5.11.3/5.11.3/android_armv7/qml/QtQuick/Extras/designer/DelayButtonSpecifics.qml
                -- Appending dependency found by qmlimportscanner: /Users/aec/Qt5.11.3/5.11.3/android_armv7/qml/QtQuick/Extras/designer/DelayButtonSpecifics.qmlc
                -- Appending dependency found by qmlimportscanner: /Users/aec/Qt5.11.3/5.11.3/android_armv7/qml/QtQuick/Extras/designer/DialSpecifics.qml
            
            1 Reply Last reply
            0
            • P Padlock

              I've been able to identify the culprit about a week ago.

              The qmlimportscanner does not examine the .pro file to see what QML files are included in the project. It also doesn't care about what's in the.qrc file(s).

              Instead, it blindly adds the modules it can find by diving into the QML files in the folder where the .pro file resides, including subfolders. Any QML file above the directory that contains the .pro file is ignored.

              I created a simple .qml file in the same directory as the .pro file. Then I only added the import lines that are used within all my .qml files in other folders. Since this lead to a syntax complaint I also added the text Page {} after the last import line.

              import QtQuick 2.9
              import QtQuick.Layouts 1.3
              import QtQuick.Controls 2.4
              import QtQuick.Shapes 1.11
              import QtMultimedia 5.8
              import QtQuick.Window 2.11
              
              Page {
              }
              

              Note that this file is not referenced in the .pro file and is of course not part of the project/application at all. It only exists for the purpuse that qmlimportscanner includes the correct modules.

              Julian Guarin 0J Offline
              Julian Guarin 0J Offline
              Julian Guarin 0
              wrote on last edited by
              #6

              @Padlock
              want to thank you!
              this was super useful.

              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