Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Module "QtQuick" is not installed (Android porting)

    Installation and Deployment
    3
    5
    3130
    Loading More Posts
    • 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.
    • S
      shedo last edited by

      Hi all,
      I'm trying to porting my application to android with qt5.4 but I have this error:

      W/Qt (30916): qrc:/qml/FrontEnd.qml:1 ((null)): qrc:/qml/FrontEnd.qml:1:1: module "QtQuick" is not installed

      This is my .pro

      @TEMPLATE = app
      TARGET = sandbox-build-android

      QT+= qml quick widgets printsupport xml svg

      INCLUDEPATH += [...]# my include path

      Input

      HEADERS += [...] # my include
      SOURCES += [...] # my source

      RESOURCES += ../sandbox/resources.qrc

      LIBS += -L$$PWD/../../edalab/else-datamodel-classes/build-buildAndroid-Android_for_armeabi_v7a_GCC_4_9_Qt_5_4_0-Debug/ -lbuildAndroid

      INCLUDEPATH += [...]
      DEPENDPATH += [...]

      contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
      ANDROID_EXTRA_LIBS = [..]
      }

      Default rules for deployment.

      include(deployment.pri)@

      This is my deployment.pri:

      @android-no-sdk {
      target.path = /data/user/qt
      export(target.path)
      INSTALLS += target
      } else:android {
      x86 {
      target.path = /libs/x86
      } else: armeabi-v7a {
      target.path = /libs/armeabi-v7a
      } else {
      target.path = /libs/armeabi
      }
      export(target.path)
      INSTALLS += target
      } else:unix {
      isEmpty(target.path) {
      qnx {
      target.path = /tmp/$${TARGET}/bin
      } else {
      target.path = /opt/$${TARGET}/bin
      }
      export(target.path)
      }
      INSTALLS += target
      }

      export(INSTALLS)@

      In my FrontEnd.qml I have this import:
      @
      import QtQuick 2.4
      import QtQuick.Controls 1.3@

      I don't see any substantial difference from .pro of example projects that work properly on Android.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        What are the small differences ? Which example did you use as a base ?

        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 Reply Quote 0
        • S
          shedo last edited by

          I have taken a new Android project (Android Templates, Qt Quick Application) as base.

          @TEMPLATE = app

          QT += qml quick widgets

          SOURCES += main.cpp

          RESOURCES += qml.qrc

          Additional import path used to resolve QML modules in Qt Creator's code model

          QML_IMPORT_PATH =

          Default rules for deployment.

          include(deployment.pri)@

          it was very minimal so I saw another example "Calendar" and I noticed that I was missing this flag " OTHER_FILES " so I added all the paths of my QML files to it but the problem persists.

          I also retrieved the apk from my smartphone and I have extracted the contents. I noticed that my apk didn't include some libraries that are present in the apk sample that works:

          bq. libqml_Qt_labs_folderlistmodel_libqmlfolderlistmodelplugin.so
          libqml_Qt_labs_settings_libqmlsettingsplugin.so
          libqml_QtQml_Models.2_libmodelsplugin.so
          libqml_QtQml_StateMachine_libqtqmlstatemachine.so
          libqml_QtQuick.2_libqtquick2plugin.so
          libqml_QtQuick_Controls_libqtquickcontrolsplugin.so
          libqml_QtQuick_Controls_Styles_Android_libqtquickcontrolsandroidstyleplugin.so
          libqml_QtQuick_Dialogs_libdialogplugin.so
          libqml_QtQuick_Dialogs_Private_libdialogsprivateplugin.so
          libqml_QtQuick_Layouts_libqquicklayoutsplugin.so
          libqml_QtQuick_Window.2_libwindowplugin.so

          My project directory structure

          .
          ├── Project1
          │   ├── file.pro
          │   ├── images
          │   │   ├── ...
          │   ├── include
          │   │   ├── sub1
          │   │   │   ├── file1.hh
          │   │   │   └── sub1.1
          │   │   │   └── file2.hh
          │   │   └── sub2
          │   │      └── file3.hh
          │   ├── qml
          │   │   ├── file1.qml
          │   │   └── sub1
          │   │      ├── file2.qml
          │   │      └── sub1.1
          │   │         └── file3.qml
          │   ├── README.txt
          │   ├── resources.qrc
          │   ├── src
          │   │   ├── sub1
          │   │   │   ├── file1.cc
          │   │   │   └── sub1.1
          │   │   │      └── file2.cc
          │   │   ├── sub2
          │   │   │   └── file3.cc
          │   │   └── Main.cc
          │   └── webUtils
          │   └── file.html

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            OTHER_FILES doesn't influence on deployment

            One thing that looks fishy is your ANDROID_EXTRA_LIBS line. You call it with = which clears its current content and replace by what follows

            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 Reply Quote 0
            • A
              andrefi last edited by

              Not sure if this applies to your issue, but I experienced something similar when deploying on Android (Qt 5.3.1). I got "module "QtQuick" is not installed" sporadically when deploying project with bundled Qt libraries in APK.

              The issue stopped when I started signing the package before deploying.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post