0
votes

Error: module "QtQuick" is not installed : appears when I deploy qt quick application on Android.

I use Qt 5.2.1 and created a Qt Quick Application project and tried to build and run the default project created.

Hello.pro

# Add more folders to ship with the application, here
folder_01.source = qml/Hello
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01

# Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =

# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp

# Installation path
# target.path =

# Please do not modify the following two lines. Required for deployment.
include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
qtcAddDeployment()

RESOURCES += \
    resources.qrc

main.cpp

#include <QtGui/QGuiApplication>
#include "qtquick2applicationviewer.h"

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/Hello/main.qml"));
    viewer.showExpanded();

    return app.exec();
}

main.qml

import QtQuick 2.0

Rectangle {
    width: 360
    height: 360
    Text {
        text: qsTr("Hello World")
        anchors.centerIn: parent
    }
    MouseArea {
        anchors.fill: parent
        onClicked: {
            Qt.quit();
        }
    }
}

This is a default project and I do not get where did I go wrong... Have someone faced same issue or knows how to resolve this?

1
Sounds like a deployment issue. What steps did you take to deploy your app?MrEricSir
@MrEricSir: I use a 64 bit windows pc, and initially when i tried to run the application, it failed giving me error BUILD FAILED D:\Installations\Android\Android SDKs\tools\ant\build.xml:716: The following error occurred while executing this line: D:\Installations\Android\Android SDKs\tools\ant\build.xml:730: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "C:\Program Files\Java\jre1.8.0_65". So I found some post telling to copy tools.jar file to jre installed path. I did and deployedUser

1 Answers

0
votes

It is solved when I used Qt 5.5.1 version. I think mostly Qt has updated something.

By going through the comments in Qt on Android , I had a thought to update Qt and it worked.