我刚刚创建了一个新的ubuntu触摸模拟器(ubuntu 14.10 sdk i386 devel)。
Check device image version..
X86 Emulator
aosp_x86
generic_x86
243
i386
我有一个默认的QML代码:
import QtQuick 2.0
import Ubuntu.Components 1.1
/*!
\brief MainView with a Label and Button elements.
*/
MainView {
// objectName for functional testing purposes (autopilot-qt5)
objectName: "mainView"
// Note! applicationName needs to match the "name" field of the click manifest
applicationName: "com.ubuntu.developer.username.newapp"
/*
This property enables the application to change orientation
when the device is rotated. The default is false.
*/
//automaticOrientation: true
// Removes the old toolbar and enables new features of the new header.
useDeprecatedToolbar: false
width: units.gu(100)
height: units.gu(75)
Page {
title: i18n.tr("Simple")
Column {
spacing: units.gu(1)
anchors {
margins: units.gu(2)
fill: parent
}
Label {
id: label
objectName: "label"
text: i18n.tr("Hello..")
}
Button {
objectName: "button"
width: parent.width
text: i18n.tr("Tap me!")
onClicked: {
label.text = i18n.tr("..world!")
}
}
}
}
}
当我在模拟器上吃午饭时,我有两个警告:
:-1: warning: desktop_Exec (app): found unexpected Exec with architecture 'all': ./qtc_device_debughelper.py
和
:-1: warning: security_policy_groups_safe_app (debug): (REJECT) reserved policy group 'debug': not for production use
The debug policy group is automatically injected and should only be used for development.
To create a package for the store use the publish tab!
显然,我的应用程序无法在ubuntu-touch上启动...
这是我的应用程序输出:
Warning: Permanently added '[127.0.0.1]:10000' (RSA) to the list of known hosts.
Sdk-Launcher> Executing: /tmp/com.ubuntu.developer.username.newapp_0.1_all.click
Sdk-Launcher> Force Install: False
Sdk-Launcher> Skip Uninstall:False
Sdk-Launcher> Launcher PID: 12359
Sdk-Launcher> Installing application .....
Sdk-Launcher> Installing the application failed
这是我的编译输出:
16:34:07: Running steps for project newApp...
sending incremental file list
deleting qtc_device_debughelper.py
./
app.apparmor
app.desktop
sent 480 bytes received 86 bytes 1.13K bytes/sec
total size is 40.86K speedup is 72.19
16:34:07: The process "/usr/bin/rsync" exited normally.
WARNING:root:Ignoring missing framework "ubuntu-sdk-14.10"
Successfully built package in './com.ubuntu.developer.username.newapp_0.1_all.click'.
16:34:07: The process "/usr/bin/click" exited normally.
16:34:07: The click package has been created in /home/morgan/qt/build-newApp-u1504_GCC_i386_ubuntu_sdk_14_10_utopic-default
= content_hub =
{
"error": {},
"info": {},
"warn": {}
}
= desktop =
{
"error": {},
"info": {
"desktop_Comment_boilerplate (app)": {
"manual_review": false,
"text": "OK"
},
"desktop_Exec_webapp_args (app)": {
"manual_review": false,
"text": "SKIPPED (not webapp-container or webbrowser-app)"
},
"desktop_Exec_webapp_container (app)": {
"manual_review": false,
"text": "SKIPPED (not webapp-container)"
},
"desktop_Exec_webbrowser (app)": {
"manual_review": false,
"text": "SKIPPED (not webbrowser-app)"
},
"desktop_Icon (app)": {
"manual_review": false,
"text": "OK"
},
"desktop_Terminal (app)": {
"manual_review": false,
"text": "OK"
},
"desktop_Type (app)": {
"manual_review": false,
"text": "OK"
},
"desktop_Version (app)": {
"manual_review": false,
"text": "OK (not specified)"
},
"desktop_X-Ubuntu-Gettext-Domain (app)": {
"manual_review": false,
"text": "OK (not specified)"
},
"desktop_X-Ubuntu-StageHint (app)": {
"manual_review": false,
"text": "OK (not specified)"
},
"desktop_X-Ubuntu-Touch (app)": {
"manual_review": false,
"text": "OK"
},
"desktop_blacklisted_keys (app)": {
"manual_review": false,
"text": "OK"
},
"desktop_duplicate_keys (app)": {
"manual_review": false,
"text": "OK"
},
"desktop_files_usable": {
"manual_review": false,
"text": "OK"
},
"desktop_groups (app)": {
"manual_review": false,
"text": "OK"
},
"desktop_required_fields_not_empty (app)": {
"manual_review": false,
"text": "OK"
},
"desktop_required_keys (app)": {
"manual_review": false,
"text": "OK"
},
"desktop_validates (app)": {
"manual_review": false,
"text": "OK"
}
},
"warn": {
"desktop_Exec (app)": {
"manual_review": false,
"text": "found unexpected Exec with architecture 'all': ./qtc_device_debughelper.py"
}
}
}
= functional =
{
"error": {},
"info": {
"functional_qml_applicationName_matches_manifest": {
"manual_review": false,
"text": "OK"
},
"functional_qml_application_uses_QtWebKit": {
"manual_review": false,
"text": "OK"
},
"functional_qml_application_uses_UbuntuWebView_0.2": {
"manual_review": false,
"text": "OK"
},
"functional_qml_application_uses_friends": {
"manual_review": false,
"text": "OK"
}
},
"warn": {}
}
= lint =
{
"error": {},
"info": {
"lint_DEBIAN_extra_files": {
"manual_review": false,
"text": "OK"
},
"lint_DEBIAN_has_control": {
"manual_review": false,
"text": "OK"
},
"lint_DEBIAN_has_manifest": {
"manual_review": false,
"text": "OK"
},
"lint_DEBIAN_has_md5sums": {
"manual_review": false,
"text": "OK"
},
"lint_DEBIAN_has_preinst": {
"manual_review": false,
"text": "OK"
},
"lint_click_files": {
"manual_review": false,
"text": "OK"
},
"lint_click_local_extensions": {
"manual_review": false,
"text": "OK"
},
"lint_control_architecture_match": {
"manual_review": false,
"text": "OK"
},
"lint_control_architecture_specified_needed": {
"manual_review": false,
"text": "SKIPPED: architecture is 'all'"
},
"lint_control_architecture_valid": {
"manual_review": false,
"text": "OK"
},
"lint_control_architecture_valid_contents": {
"manual_review": false,
"text": "OK"
},
"lint_control_click_version_up_to_date": {
"manual_review": false,
"text": "OK"
},
"lint_control_description_match": {
"manual_review": false,
"text": "OK"
},
"lint_control_has_Architecture": {
"manual_review": false,
"text": "OK"
},
"lint_control_has_Click-Version": {
"manual_review": false,
"text": "OK"
},
"lint_control_has_Description": {
"manual_review": false,
"text": "OK"
},
"lint_control_has_Installed-Size": {
"manual_review": false,
"text": "OK"
},
"lint_control_has_Maintainer": {
"manual_review": false,
"text": "OK"
},
"lint_control_has_Package": {
"manual_review": false,
"text": "OK"
},
"lint_control_has_Version": {
"manual_review": false,
"text": "OK"
},
"lint_control_installed_size": {
"manual_review": false,
"text": "OK"
},
"lint_control_maintainer_match": {
"manual_review": false,
"text": "OK"
},
"lint_control_package_match": {
"manual_review": false,
"text": "OK"
},
"lint_control_structure": {
"manual_review": false,
"text": "OK"
},
"lint_control_version_match": {
"manual_review": false,
"text": "OK"
},
"lint_description": {
"manual_review": false,
"text": "OK"
},
"lint_description_present": {
"manual_review": false,
"text": "OK"
},
"lint_exclusive_hooks_app": {
"manual_review": false,
"text": "OK"
},
"lint_external_symlinks": {
"manual_review": false,
"text": "OK"
},
"lint_framework": {
"manual_review": false,
"text": "OK"
},
"lint_hardcoded_paths": {
"manual_review": false,
"text": "OK"
},
"lint_hooks_app_apparmor": {
"manual_review": false,
"text": "OK (run check-security for more checks)"
},
"lint_hooks_app_apparmor_known": {
"manual_review": false,
"text": "OK"
},
"lint_hooks_app_desktop_known": {
"manual_review": false,
"text": "OK"
},
"lint_hooks_app_valid": {
"manual_review": false,
"text": "OK"
},
"lint_hooks_multiple_apps": {
"manual_review": false,
"text": "OK"
},
"lint_hooks_redflag_app": {
"manual_review": false,
"text": "OK"
},
"lint_icon_present": {
"manual_review": false,
"text": "Skipped, optional icon not present"
},
"lint_maintainer_domain": {
"manual_review": false,
"text": "OK (package domain=('com.ubuntu.developer.', 'net.launchpad.'))"
},
"lint_maintainer_format": {
"manual_review": false,
"text": "OK"
},
"lint_maintainer_present": {
"manual_review": false,
"text": "OK"
},
"lint_manifest_architecture_valid": {
"manual_review": false,
"text": "OK"
},
"lint_md5sums": {
"manual_review": false,
"text": "OK"
},
"lint_package_filename_arch_match": {
"manual_review": false,
"text": "OK"
},
"lint_package_filename_arch_valid": {
"manual_review": false,
"text": "OK"
},
"lint_package_filename_format": {
"manual_review": false,
"text": "OK"
},
"lint_package_filename_matches_namespace": {
"manual_review": false,
"text": "OK"
},
"lint_package_filename_pkgname_match": {
"manual_review": false,
"text": "OK"
},
"lint_package_filename_version_match": {
"manual_review": false,
"text": "OK"
},
"lint_pkgname_valid": {
"manual_review": false,
"text": "OK"
},
"lint_preinst": {
"manual_review": false,
"text": "OK"
},
"lint_sdk_security_extension_app": {
"manual_review": false,
"text": "OK"
},
"lint_title": {
"manual_review": false,
"text": "OK"
},
"lint_title_present": {
"manual_review": false,
"text": "OK"
},
"lint_vcs_files": {
"manual_review": false,
"text": "OK"
},
"lint_version_valid": {
"manual_review": false,
"text": "OK"
}
},
"warn": {}
}
= online_accounts =
{
"error": {},
"info": {},
"warn": {}
}
= push_helper =
{
"error": {},
"info": {},
"warn": {}
}
= scope =
{
"error": {},
"info": {},
"warn": {}
}
= security =
{
"error": {
"security_policy_groups_safe_app (debug)": {
"manual_review": false,
"text": "(REJECT) reserved policy group 'debug': not for production use"
}
},
"info": {
"security_ignored_fields (app.apparmor)": {
"manual_review": false,
"text": "OK"
},
"security_policy_groups_duplicates_app (app.apparmor)": {
"manual_review": false,
"text": "OK"
},
"security_policy_groups_exists_app (app.apparmor)": {
"manual_review": false,
"text": "OK"
},
"security_policy_groups_safe_app (networking)": {
"manual_review": false,
"text": "OK"
},
"security_policy_groups_valid_app (debug)": {
"manual_review": false,
"text": "OK"
},
"security_policy_groups_valid_app (networking)": {
"manual_review": false,
"text": "OK"
},
"security_policy_vendor (app.apparmor)": {
"manual_review": false,
"text": "OK"
},
"security_policy_version_exists (app.apparmor)": {
"manual_review": false,
"text": "OK"
},
"security_policy_version_is_highest (1.2, app.apparmor)": {
"manual_review": false,
"text": "OK"
},
"security_policy_version_matches_framework (app.apparmor)": {
"manual_review": false,
"text": "OK"
},
"security_redflag_fields (app.apparmor)": {
"manual_review": false,
"text": "OK"
},
"security_template_valid (app.apparmor)": {
"manual_review": false,
"text": "OK (none specified)"
},
"security_template_with_policy_version (app.apparmor)": {
"manual_review": false,
"text": "OK"
}
},
"warn": {}
}
= url_dispatcher =
{
"error": {},
"info": {},
"warn": {}
}
16:34:08: The process "/usr/bin/click" exited with code 1.
16:34:08: Ignoring return code for this step
16:34:08: Uploading file '/home/morgan/qt/build-newApp-u1504_GCC_i386_ubuntu_sdk_14_10_utopic-default/com.ubuntu.developer.username.newapp_0.1_all.click'...
16:34:08: Uploading file '/usr/share/qtcreator/ubuntu/scripts/qtc_device_applaunch.py'...
16:34:08: All files successfully deployed.
16:34:08: Deploy step finished.
16:34:08: Elapsed time: 00:02.
这是我的manifest.json
{
"architecture": "all",
"description": "description of newApp",
"framework": "ubuntu-sdk-14.10",
"hooks": {
"app": {
"apparmor": "app.apparmor",
"desktop": "app.desktop"
}
},
"maintainer": "Morgan DURAND <[email protected]>",
"name": "com.ubuntu.developer.username.newapp",
"title": "newApp",
"version": "0.1"
}
编辑 :
我决定从头开始创建一个新的模拟器。
第一步,创建一个仿真器:
Checking installed emulator package.
ii ubuntu-emulator 0.4+15.04.20141104.1-0ubuntu1
Search configured emulator instances.
ubuntui386 ubuntu=20140917,device=20140917,version=243,arch=i386
Detecting device..
Creating new emulator instance.
Creating "ubui386" from devel revision 243
Downloading...
Setting up...
Setting up a default password for phablet to: '0000'
现在,我通过单击“自动创建工具包”来创建新工具包
这是autocreate的结果:
这是我的manifest.json:
{
"architecture": "all",
"description": "description of newApp",
"framework": "ubuntu-sdk-14.10",
"hooks": {
"app": {
"apparmor": "app.apparmor",
"desktop": "app.desktop"
}
},
"maintainer": "Morgan DURAND <[email protected]>",
"name": "com.ubuntu.developer.username.newapp",
"title": "newApp",
"version": "0.1"
}
我仍然有同样的问题
注意:我创建了i386映像,因为无法创建armhf映像:
Checking installed emulator package.
ii ubuntu-emulator 0.4+15.04.20141104.1-0ubuntu1
Search configured emulator instances.
cat: /home/morgan/.local/share/ubuntu-emulator/ubuntuarmhf/.device: No such file or directory
Detecting device..
Creating new emulator instance.
Creating "ubuntuarmhf" from devel revision 243
Downloading...
Setting up...
Setting up a default password for phablet to: '0000'
chroot: failed to run command ‘/bin/sh’: Exec format error
Search configured emulator instances.
cat: /home/morgan/.local/share/ubuntu-emulator/ubuntuarmhf/.device: No such file or directory
当仿真器的体系结构与用于生成程序包的click目标的体系结构不匹配时,会发生此错误。(花了我好一会儿才知道。)
根据您在帖子中包含的编译输出,您正在使用i386 click目标。我猜想您已经构建并运行了armhf模拟器,因此出现了错误。
您需要执行以下操作之一:
我建议首选,因为i386仿真器的运行速度比armhf仿真器快几个数量级。(armhf仿真器必须仿真ARM CPU。)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句