从有Ubuntu要准备发布Phone版本就在开始关注了,尤其是其官方开发网站上的相关教程的阅读;前一段时间也试着搭建环境和进行初步的示例开发,网址为:

http://developer.ubuntu.com/get-started/gomobile/

现在更新后的教程是:

Get the Ubuntu SDK preview

The first thing you'll need to do is to install the tools and its dependencies. The installation will take place from PPAs, which are archives of packages that enable rapid delivery of updates. It’s an easy step that should take just a few minutes.

Install Qt 5

The Ubuntu SDK preview is built upon the latest version of the Qt framework, which we’re going to install now:

  1. Open a terminal by pressing the Ctrl+Alt+T key combination
  2. Enter the following command, pressing Enter at the end of the line and following the prompts
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper

Install the Ubuntu SDK preview

Once the dependencies are resolved, we’re going to install the Ubuntu UI toolkit as part of the Ubuntu SDK:

  1. If it wasn't open already, launch a terminal by pressing the Ctrl+Alt+T key combination
  2. Enter the following command, pressing Enter at the end of the line and following the prompts
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo apt-get update && sudo apt-get install ubuntu-sdk notepad-qml

当初没有这么好运,两行代码跟上面的有些出入,比如,安装的是qt5-beta1的ppa,而不是现在的qt5-proper,当时添加了个http://ppa.launchpad.net/ui-toolkit/ppa/ubuntu 的库,自动安装的Ubuntu的Components在/opt/qt5/imports/Ubuntu目录下,可是当前的更新后的qt-components-ubuntu包把文件都安装到了如下目录中:

/usr/lib/i386-linux-gnu/qt5/qml/Ubuntu/

虽然参考了一些教程,设置了环境变量:

export QML_IMPORT_PATH=/usr/lib/i386-linux-gnu/qt5/qml:$QML_IMPORT_PATH

也在测试项目中添加了路径配置代码:

    /* List of plugin directories passed to QML runtime */importPaths: [ "/usr/lib/i386-linux-gnu/qt5/qml","." ,"/usr/bin", "/opt/qt5/imports" ]

但是运行qmlscene的时候,还是提示错误:

Starting external tool '/opt/qt5/bin/qmlscene' t.qml
Got bus address:  "unix:abstract=/tmp/dbus-szRCO8tHBe,guid=9bef4d79deacf239b947461e512a167e" Connected to accessibility bus at:  "unix:abstract=/tmp/dbus-szRCO8tHBe,guid=9bef4d79deacf239b947461e512a167e" Registered DEC:  true file:///t.qml:2:1: module "Ubuntu.Components" is not installed import Ubuntu.Components 0.1 ^ 

有待继续研究该路径和程序问题!总的来说是版本混乱了,要清理原来版本的配置、实现新版本的依赖和程序的调用关系!

先分析新版本的Ubuntu-SDK里面的依赖方式:

使用gdebi程序打开下载好的Ubuntu-SDK的开发包: ubuntu-sdk_0.1~bzr20130204-0ubuntu1~quantal1~test4_i386.deb

该包中说明如下:

Ubuntu SDK
This package depends on all the needed packages of the Ubuntu SDK:
* Qt 5
* Qt Creator
* Ubuntu UI Toolkit
* Demos and examples 

而进行qml文件调试的程序是qmlscene,应该属于qt5的开发包;故继续追踪新的安装路径:

同样用gdebi文件打开包: qtbase5-dev-tools_5.0.0-0ubuntu1~quantal2~test3~nonupstreampatched2_i386.deb

发现里面程序的安装路径为:

/usr/lib/i386-linux-gnu/qt5/bin/

新版Ubuntu-SDK的程序都安装在该目录下!重新配置qtcreator里面的qmlscene预览程序的路径,快捷键启动成功了!

配一个截图搞定!

大家现在去按照官网说明安装相应工具后,也注意教程中调适工具的路径设置为新的哟!

网站: http://developer.ubuntu.com/get-started/gomobile/#step-get-toolkit

路径: /usr/lib/i386-linux-gnu/qt5/bin/

更新后的教程应该是:

Here’s a tip: although Qt Creator does not yet support qmlscene as QML viewer, you can invoke it from within the IDE. Here’s how:

  1. In Qt Creator, go to Tools > Options…
  2. Choose the External Tools tab, then in the pane select the Preview (qmlviewer) entry
  3. On the Executable: field on the right, replace the contents with  /usr/lib/i386-linux-gnu/qt5/bin/qmlscene.
  4. Optionally change the command name by double-clicking on the Preview (qmlviewer) entry from above. You can call it Preview (qmlscene).
  5. Click on OK to save the changes.

Now you’ll be able to view your app through the Tools > External > Qt Quick > Preview (qmlscene) menu entry, from within the IDE and you won’t need a terminal anymore.

转载于:https://www.cnblogs.com/QuLory/archive/2013/02/25/2928939.html

【使用Ubuntu SDK】入门篇——qtcreator 运行qmlscene时 module Ubuntu.Components is not installed 错误分析和解决...相关推荐

  1. Ubuntu SDK 安装

    在这篇文章里,你将学到如何安装Ubuntu SDK到你的系统中,并生成一个简单的应用以测试你的安装是否成功.对英文好的学习者,可以参考Ubuntu 网站中的英文地址来进行安装.如果开发者想对Ubunt ...

  2. Ubuntu配置多版本Python运行环境

    Ubuntu配置多版本Python运行环境 环境 操作系统 Ubuntu 18.04.6 LTS (Bionic Beaver) 内容 机器已有python 3.6,再增加python 3.9,当运行 ...

  3. Ubuntu安装jupyter,启动出现ModuleNotFoundError: No module named ‘pysqlite2‘ 错误

    Ubuntu安装jupyter,启动出现ModuleNotFoundError: No module named 'pysqlite2' 错误 错误描述 错误定位 解决错误 后记 错误描述 Ubunt ...

  4. 运行mysql时,提示Table ‘performance_schema.session_variables’ doesn’t exist

    运行mysql时,提示Table 'performance_schema.session_variables' doesn't exist 解决的方法是: 第一步:在管理员命令中输入: mysql_u ...

  5. ubuntu入门---从配置虚拟机到使用qtcreator运行opencv3.4(C++)

    文章目录 前言 一.使用VMware安装ubuntu16.04 二.LINUX基本指令 1.LINUX简单介绍 2.基本指令 三.配置GCC 1.GCC简介 2.安装GCC 3.安装并不同的GCC版本 ...

  6. Physx3.4学习随笔(入门篇1)-SDK与环境搭建

    Physx3.4学习随笔(入门篇1)-SDK与环境搭建 SDK与环境搭建 SDK获取 PhysX Visual Debugger 执行SnippetHelloworld SDK与环境搭建 本文主要介绍 ...

  7. Linux之Ubuntu入门篇

    Linux之Ubuntu入门篇 第1讲 开发电脑的选择 第2讲 VMware软件安装和虚拟机创建 第3讲 Ubuntu操作系统的安装 第4讲 Ubuntu初次体验 第5讲 虚拟机连接USB设备 第6. ...

  8. Yocto系列讲解[入门篇] 1 - 快速入门熟悉Yocto的构建

    By: fulinux E-mail: fulinux@sina.com Blog: https://blog.csdn.net/fulinus 喜欢的盆友欢迎点赞和订阅! 你的喜欢就是我写作的动力! ...

  9. .NET Core实战项目之CMS 第二章 入门篇-快速入门ASP.NET Core看这篇就够了

    本来这篇只是想简单介绍下ASP.NET Core MVC项目的(毕竟要照顾到很多新手朋友),但是转念一想不如来点猛的(考虑到急性子的朋友),让你通过本文的学习就能快速的入门ASP.NET Core.既 ...

最新文章

  1. 2.6 Word2Vec-深度学习第五课《序列模型》-Stanford吴恩达教授
  2. 关于.NET中的Server push技术
  3. 彻底理解正向代理和反向代理
  4. ElasticSearch 小记
  5. 数据结构+算法+c++学习(写在前面)
  6. 服务器云端设置怎么退出_换新手机时,3个地方要及时清除退出,别让旧手机成隐私“内鬼”...
  7. pdf类型转换器打印机
  8. 我所了解的GB2312、Unicode、GBK、UTF-8、BIG5等编码
  9. 【老生谈算法】基于matlab时域频域处理的语音信号变声处理系统设计与算法原理(论文+程序源码+GUI图形用户界面)——变声算法
  10. PPT幻灯片放映时不显示视频(旁白)
  11. java计算为0_Java中除数为0时计算报错的问题
  12. Java学习1——计算机基础知识
  13. 头哥 (Educoder)数据结构与算法实验:实验11 TYJ动态规划
  14. linux运行java程序内存过大_排查java应用linux环境内存占用过高的问题
  15. AutoCAD .NET: 遍历模型空间
  16. mysql_性能优化一(慢查询分析)
  17. 个人JAVA学习笔记总结(1)(1)
  18. Axure9 最新授权码,持续更新中
  19. ElasticSearch的介绍与安装
  20. 时分秒针旋转角度换算

热门文章

  1. mysql 5.6 cmake_mysql5.6如何使用cmake编译
  2. java oracle 触发器_Oracle 触发器
  3. DocumentFragment文档片段示例
  4. 计算机基础判断试题及答案,计算机基础知识试题及答案判断题
  5. [转]OpenMP 入门指南
  6. 30秒的PHP代码片段(1)数组 - Array
  7. 一篇文章看懂Java并发和线程安全
  8. QTP的那些事 -– Visual Relation Identifier Feature: How to use in the real world
  9. VTK中导入并显示STL、3DS文件
  10. asp.net mvc 依赖缓存启动项配置