错误:我在Andorid上部署qt快速应用程序时出现未安装模块“QtQuick”

时间:2015-12-09 03:58:13

标签: android qt qtquick2

错误:未安装模块“QtQuick”:在Andorid上部署qt quick应用程序时出现。

我使用qt 5.2.1并创建了一个Qt Quick Application项目,并尝试构建并运行创建的默认项目。

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();
        }
    }
}

这是一个默认项目,我不知道我哪里出错了......有人遇到同样的问题或知道如何解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

使用Qt 5.5.1版本时解决了。我认为大多数Qt已经更新了一些东西。

通过查看Qt on Android中的评论,我想到了更新Qt并且它有效。