简体   繁体   English

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

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

Error: module "QtQuick" is not installed : appears when I deploy qt quick application on Android.错误:未安装模块“QtQuick”:当我在 Android 上部署 qt 快速应用程序时出现。

I use Qt 5.2.1 and created a Qt Quick Application project and tried to build and run the default project created.我使用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();
        }
    }
}

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?这是一个默认项目,我不明白我哪里出错了......有人遇到过同样的问题或知道如何解决这个问题吗?

It is solved when I used Qt 5.5.1 version.当我使用 Qt 5.5.1 版本时已解决。 I think mostly Qt has updated something.我认为大部分 Qt 已经更新了一些东西。

By going through the comments in Qt on Android , I had a thought to update Qt and it worked.通过查看Qt on Android 中的评论,我想到了更新 Qt 并且它奏效了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM