构建应用程序时Qt错误

时间:2017-07-05 14:18:22

标签: android c++ qt c++11 build

当我尝试为android构建我的项目时,会发生以下错误:

Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils
Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils
Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl
Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl
Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl

这些不仅仅是无意义的警告!这些都是非常重要的问题,因为Qt创建者无法快速导入Qt。 因此,我的应用程序将没有任何可视对象。 我该如何解决这个错误? 这也是我项目的.pro文件:

QT += qml quick
CONFIG += c++11
SOURCES += main.cpp \
    downloader.cpp \
    filemanager.cpp
HEADERS += \
    downloader.h \
    filemanager.h
RESOURCES += qml.qrc
QT += network
QT += xml
QT += gui
QML_IMPORT_PATH = /home/muhammad/Qt5.9.0/5.9/android_armv7/qml/
#QML_DESIGNER_IMPORT_PATH =
DEFINES += QT_DEPRECATED_WARNINGS
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
DISTFILES += \
    android/AndroidManifest.xml \
    android/gradle/wrapper/gradle-wrapper.jar \
    android/gradlew \
    android/res/values/libs.xml \
    android/build.gradle \
    android/gradle/wrapper/gradle-wrapper.properties \
    android/gradlew.bat \
    android/AndroidManifest.xml \
    android/gradle/wrapper/gradle-wrapper.jar \
    android/gradlew \
    android/res/values/libs.xml \
    android/build.gradle \
    android/gradle/wrapper/gradle-wrapper.properties \
    android/gradlew.bat
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android

0 个答案:

没有答案