QT5.2 Android App找不到插件qmlxmllistmodelplugin

在QML文件中使用XmlListModel时,编译成桌面版时没有任何问题,但是编译并部署到Android模拟器时却报错:

module "QtQuick.XmlListModel" plugin "qmlxmllistmodelplugin" not found 



官方给出的解释是:

Creator in 3.0 can't detect dependencies in the qml files. There's a tool in development to fix that and hopefully we can make use of that in the future.


官方给出的解决方法是:

In your case linking your application against xmlpatterns makes it work. Add QT+=xmlpatterns to the .pro file and ensure that it links again. (qmake doesn't link if you only change the .pro file.)

即在pro文件中加入 QT += xmlpatterns, 并且需要重新编译连接项目


官方:https://bugreports.qt-project.org/browse/QTCREATORBUG-11123?focusedCommentId=226309&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-226309

你可能感兴趣的:(android,Qt5.2)