在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

更多相关文章

  1. Android(安卓)手势 正则匹配图片
  2. Android(安卓)软键盘的监听(监听高度,是否显示)
  3. android 控件之checkbox自定义样式
  4. Android(安卓)通过adb shell am broadcast发送广播
  5. android中Bitmap对象怎么保存为文件?
  6. Android(安卓)xml 文件代码自动提示
  7. Android(安卓)Studio 中build.gradle文件的详细解析
  8. Android(安卓)AIDL详解
  9. Android(安卓)Studio的.gitignore以及gitignore无效的解决

随机推荐

  1. Android IntentService问题
  2. 简单的 Android 拍照并显示以及获取路径
  3. Android 利用发送Intent播放本地视频和网
  4. Android 动画效果设置
  5. Android Studio初步使用及HelloWorld详解
  6. android 横向滚动屏幕实现(1)
  7. Android(安卓)基于Retrofit+Rxjava搭建的
  8. 我的android 第15天 -使用SQLiteOpenHelp
  9. Android(安卓)4.4 webview 架构
  10. android ndk开发