[英]Error: module "QtQuick" is not installed appears when I deploy qt quick application on Android
錯誤:未安裝模塊“QtQuick”:當我在 Android 上部署 qt 快速應用程序時出現。
我使用Qt 5.2.1並創建了一個 Qt Quick Application 項目,並嘗試構建和運行創建的默認項目。
你好
# 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
主程序
#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();
}
主文件
import QtQuick 2.0
Rectangle {
width: 360
height: 360
Text {
text: qsTr("Hello World")
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
}
}
這是一個默認項目,我不明白我哪里出錯了......有人遇到過同樣的問題或知道如何解決這個問題嗎?
當我使用 Qt 5.5.1 版本時已解決。 我認為大部分 Qt 已經更新了一些東西。
通過查看Qt on Android 中的評論,我想到了更新 Qt 並且它奏效了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.