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. Qt modules are not installed
QtWS25 Last Chance

Qt modules are not installed

Scheduled Pinned Locked Moved Solved Mobile and Embedded
qml android
14 Posts 4 Posters 7.3k 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.
  • F Offline
    F Offline
    Ferni
    wrote on 12 Oct 2016, 14:47 last edited by
    #1

    Hi everyone!
    I'm working with Qt for Android and I could build and create successfully the apk but on runtime I receive a strange warning.

    W libAPPEXAMPLE.so: assets:/APPEXAMPLE/main.qml:3 ((null)): assets:/APPEXAMPLE/main.qml:3:1: module "QtQuick.Window" is not installed
    W libAPPEXAMPLE.so: assets:/APPEXAMPLE/main.qml:2 ((null)): assets:/APPEXAMPLE/main.qml:2:1: module "QtQuick" is not installed
    W libAPPEXAMPLE.so: assets:/APPEXAMPLE/main.qml:4 ((null)): assets:/APPEXAMPLE/main.qml:4:1: module "QtMultimedia" is not installed
    

    I could copy the qml modules into the apk in assest with:

    ANDROID_EXTRA_PLUGINS += \
                                                  PATH_TO_WHATEVER
    

    but I'm not sure if this is the right place or if the files should be copy in /assets/--Added-by-androiddeployqt--/ (as I saw in a qt example)

    Could someone explain me how to copy properly the qml modules into the apk and how to set the path (if needed).

    I also want to load some qml modules that I've done, I guess it would be pretty much the same, isn't it?

    Thanks!
    Fernando

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Ferni
      wrote on 18 Oct 2016, 13:57 last edited by
      #2

      After almost a week and no progress in this topic, I tried with a basic application template. I created a new project (Application --> Qt Quick Application) and deployed a Hello World to my android device. Everything went just fine until I wanted to move the project's file. Qt creator does not have a neat structure for the examples to I wanted to have this:

      AppName
      | -----project ---> .pro, .pri files
      |
      | -----src ---> .cpp files
      |
      | -----include ---> .h files
      |
      | -----resources ---> .qrc, .qml. images, sounds, etc files

      I moved the files one by one and made a deploy in every step I took BUT when I moved the .pro and .pri files I received the same error I asked before:

      W libTemplate_Android.so: (null):0 ((null)): QQmlApplicationEngine failed to load component
      W libTemplate_Android.so: (null):0 ((null)): qrc:/main.qml:1 module "QtQuick" is not installed
      W libTemplate_Android.so: qrc:/main.qml:2 module "QtQuick.Window" is not installed
      W libTemplate_Android.so: qrc:/main.qml:1 module "QtQuick" is not installed
      W libTemplate_Android.so: qrc:/main.qml:2 module "QtQuick.Window" is not installed
      10-18 10:55:06.785 14226 14256 W libTemplate_Android.so:
      

      Does anyone have idea about what I'm doing wrong or if I'm doing something that it's prohibited in qt? Any ideas how to solve this?
      Am I using the right file structure for my project?

      Thanks!!
      Fernando

      J 1 Reply Last reply 19 Oct 2016, 04:50
      0
      • F Ferni
        18 Oct 2016, 13:57

        After almost a week and no progress in this topic, I tried with a basic application template. I created a new project (Application --> Qt Quick Application) and deployed a Hello World to my android device. Everything went just fine until I wanted to move the project's file. Qt creator does not have a neat structure for the examples to I wanted to have this:

        AppName
        | -----project ---> .pro, .pri files
        |
        | -----src ---> .cpp files
        |
        | -----include ---> .h files
        |
        | -----resources ---> .qrc, .qml. images, sounds, etc files

        I moved the files one by one and made a deploy in every step I took BUT when I moved the .pro and .pri files I received the same error I asked before:

        W libTemplate_Android.so: (null):0 ((null)): QQmlApplicationEngine failed to load component
        W libTemplate_Android.so: (null):0 ((null)): qrc:/main.qml:1 module "QtQuick" is not installed
        W libTemplate_Android.so: qrc:/main.qml:2 module "QtQuick.Window" is not installed
        W libTemplate_Android.so: qrc:/main.qml:1 module "QtQuick" is not installed
        W libTemplate_Android.so: qrc:/main.qml:2 module "QtQuick.Window" is not installed
        10-18 10:55:06.785 14226 14256 W libTemplate_Android.so:
        

        Does anyone have idea about what I'm doing wrong or if I'm doing something that it's prohibited in qt? Any ideas how to solve this?
        Am I using the right file structure for my project?

        Thanks!!
        Fernando

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 19 Oct 2016, 04:50 last edited by
        #3

        @Ferni If you're moving files around then you have to update your pro file. Check the paths there.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        2
        • F Offline
          F Offline
          Ferni
          wrote on 19 Oct 2016, 14:12 last edited by
          #4

          Hey @jsulm thanks for the answer!! Yeap, I didn't miss that. I could do the run qmake and build successfully and the problem is a runtime issue. I could not find anything yet in Qt's webpage about the problem :/

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 19 Oct 2016, 20:10 last edited by
            #5

            Hi,

            Do you have a AppName.pro file ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • F Offline
              F Offline
              Ferni
              wrote on 20 Oct 2016, 13:46 last edited by Ferni
              #6

              Hey @SGaist !! Yes, I do. I let it here. I'm almost 100% sure that there is no problem with my .pro. Anyways, I find really strange that Qt has problem with the location of the files. What I know (from Qt documentation) is that resources must be located in the .qrc folder (or subfolder). But there is no comments about the relation between .pro and .qrc. What I could do to solve this is:

              1. Create a dummy.qml with the includes and an empty Item
              2. Locate the file with the .pro
              3. Add the file under OTHER_FILES
              4. Use the assets approach to access qml and other resources
                Now, the QtQuick, QtQuick.Window and others Qt Modules are recognized but I'd like to use the qrc approach since it is multiplatform.
              TEMPLATE = app
              
              QT += qml quick
              CONFIG += c++11
              
              SOURCES += \
                          ../src/main.cpp \
              
              # Additional import path used to resolve QML modules in Qt Creator's code model
              QML_IMPORT_PATH = 
              
              # Default rules for deployment.
              include(../deployment.pri)
              
              RESOURCES += ../qrc/qml.qrc
              
              DISTFILES += \
                  android/AndroidManifest.xml \
                  android/gradle/wrapper/gradle-wrapper.jar \
                  android/gradlew \
                  android/res/values/libs.xml \
                  android/build.gradle \
                  android/gradle/wrapper/gradle-wrapper.properties \
                  android/gradlew.bat
              
              ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
              
              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 20 Oct 2016, 18:55 last edited by
                #7

                What does you main .pro file look like ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  Ferni
                  wrote on 20 Oct 2016, 20:24 last edited by
                  #8

                  I wrote my main .pro file in the last reply

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 20 Oct 2016, 20:25 last edited by
                    #9

                    Then I may have misunderstood your setup.

                    Isn't that .pro file in a subfolder called project in your source tree ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sierdzio
                      Moderators
                      wrote on 21 Oct 2016, 06:01 last edited by
                      #10

                      @SGaist I think @Ferni has .pro file in a subfolder, but is not using SUBDIRS approach. Instead, all .pro/.pri files are stored in "project" dir.

                      (Z(:^

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 21 Oct 2016, 07:33 last edited by
                        #11

                        @sierdzio That's also what I've concluded and I wonder if this isn't why qmake might get lost.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          sierdzio
                          Moderators
                          wrote on 21 Oct 2016, 09:00 last edited by sierdzio
                          #12

                          @SGaist It might. Older qmake (or Qt Creator) versions definitely would get confused. I'm not sure about newest releases, I vaguely recall mentions of some fixes in this area, but I have not tested it. I keep my .pro files ordered as Qt expects it to ;)

                          (Z(:^

                          1 Reply Last reply
                          1
                          • F Offline
                            F Offline
                            Ferni
                            wrote on 21 Oct 2016, 12:38 last edited by
                            #13

                            Hey! Sorry for my late reply but it's 9am here! I tried (as @sierdzio said) just one .pro but I separated my files in folders (not the subdirs structure). Since I'm relative new to Qt and I discover every day something new, I don't know if what I've done it's ok or not.

                            Know I put all my resources (qml, sounds, images, etc) in the .pro's folder and I'm trying to make it work. It was just curiosity aboute why the .qrc has to be placed at the same level or in a subfolder from the .pro.

                            I'll mark this post as SOLVED because the problem is related to the project's structure and there is no problem with Qt.

                            Thank you guys!!

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 21 Oct 2016, 13:19 last edited by
                              #14

                              Currently the only rule I am aware of is that all the files you put in the .qrc must in the same folder or in a subfolder of where the .qrc file lives.

                              You may have found something new.

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              1

                              2/14

                              18 Oct 2016, 13:57

                              topic:navigator.unread, 12
                              • Login

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