AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 513833
Accepted
Nymeria
Nymeria
Asked: 2014-08-21 05:55:21 +0800 CST2014-08-21 05:55:21 +0800 CST 2014-08-21 05:55:21 +0800 CST

为什么我的应用程序在 ubuntu-touch 上崩溃?

  • 772

我想尝试使用 QML 为 ubuntu-touch 创建一个应用程序!

我创建了一个简单的应用程序:

import QtQuick 2.0
import QtQuick.Controls 1.1
import Ubuntu.Components 0.1
import "components"


/*!
    \brief MainView with a Label and Button elements.
*/
import QtQuick.LocalStorage 2.0
import QtQuick.Layouts 1.1

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.z-admin-angels-gmail-com.oweMe"

    /*
     This property enables the application to change orientation
     when the device is rotated. The default is false.
    */
    automaticOrientation: true

    width: units.gu(100)
    height: units.gu(75)

    Page {
        title: i18n.tr("oweMe")

        Column {
            anchors.rightMargin: 8
            anchors.bottomMargin: 8
            anchors.leftMargin: 24
            anchors.topMargin: 24
            spacing: units.gu(1)
            anchors {
                margins: units.gu(2)
                fill: parent
            }

            Row {
                id: gridButton
                x: 218
                y: 30
                width: 541
                height: 65

                Button {
                    objectName: "addDebpt"
                    text: i18n.tr("add debpt")
                    color: UbuntuColors.midAubergine
                    onClicked: {
                        var component = Qt.createComponent("qml/MyQmlFile.qml");
                                        if (component.status == Component.Ready)
                                            component.createObject(label1, {"x": 100, "y": 100});

                    }
                }

                /*Button {
                    width: 153
                    objectName: "addCommunBuy"
                    text: i18n.tr("add commun Buy")
                    color: UbuntuColors.lightAubergine
                    onClicked: {

                    }
                }*/

                Button {
                    width: 153
                    objectName: "removeDebpt"
                    text: i18n.tr("remove debpt")
                    color: UbuntuColors.lightAubergine
                    onClicked: {

                    }
                }

            } // ButtonGRID
        }

        GridLayout {
            id: gridForm
            x: 42
            y: 92
            width: 622
            height: 340

            Label {
                id: label1
                x: 227
                y: 218
                width: 272
                height: 89
                text: qsTr("Open QML HERE")
                font.pointSize: 21
                horizontalAlignment: Text.AlignHCenter
                wrapMode: Text.WrapAnywhere
            }
        }
    } // grid Content
}

当我用 ubuntu i386 模拟器午餐我的应用程序时,应用程序崩溃......或者当我用桌面运行它时我没有问题

应用程序输出:

Executing: /tmp/com.ubuntu.developer.username.oweme_0.1_all.click Launcher PID: 4502 AppId: com.ubuntu.developer.username.oweme_oweMe_0.1 Architecture: all

Transaction:    Installing files Status:    Waiting in queue Status:    Starting Status:    Finished Transaction:   Installing files Status:    Waiting in queue Status:    Waiting for authentication Status:  Waiting in queue Status:    Starting Status:    Finished Results: Installed    com.ubuntu.developer.username.oweme-0.1.all (installed:click,removable=1,app_name=oweMe) Application installed, executing Registering hooks Start Application Application started: 4572



Received a failed event The Application exited, cleaning up Transaction:    Removing Status:    Waiting in queue Status:    Starting Status:    Finished Transaction:   Removing Status:    Waiting in queue Status:    Waiting for authentication Status:  Waiting in queue Status:    Starting Status:    Finished Results:

和一般输出:

[15:38:15] ii 单击-reviewers-tools 0.8-0~214~ubuntu14.04.1

和我的编译输出:

16:28:56: Running steps for project oweMe...
sending incremental file list
deleting qtc_device_debughelper.py
./
oweMe.desktop
oweMe.json

sent 682 bytes  received 89 bytes  1.54K bytes/sec
total size is 46.47K  speedup is 60.27
16:28:56: The process "/usr/bin/rsync" exited normally.
WARNING:root:Ignoring missing framework "ubuntu-sdk-14.10-dev2"
Successfully built package in './com.ubuntu.developer.username.oweme_0.1_all.click'.
16:28:56: The process "/usr/bin/click" exited normally.
16:28:56: The click package has been created in /home/morgan/build-oweMe-ubuntui386_GCC_i386_ubuntu_sdk_14_10_utopic-default
16:28:56: Connecting to device...
16:28:57: Uploading file '/home/morgan/build-oweMe-ubuntui386_GCC_i386_ubuntu_sdk_14_10_utopic-default/com.ubuntu.developer.username.oweme_0.1_all.click'...
16:28:57: Uploading file '/usr/share/qtcreator/ubuntu/scripts/qtc_device_applaunch.py'...
16:28:57: All files successfully deployed.
16:28:57: Deploy step finished.
16:28:57: Elapsed time: 00:02.
application-development
  • 1 1 个回答
  • 274 Views

1 个回答

  • Voted
  1. Best Answer
    Nymeria
    2014-08-21T06:55:32+08:002014-08-21T06:55:32+08:00

    我发现了问题!

    它崩溃了,因为我使用

    import QtQuick.Controls 1.1
    

    没有它,它工作得很好

    • 0

相关问题

  • 应用程序通常在哪里存储数据?

  • 我应该为 Vala 使用哪个 IDE?

  • 安装用户应用程序时,“最佳实践”建议它们位于何处?

  • 为 Python 应用程序设置构建系统

  • 如何在 Ubuntu 上开发 .NET 应用程序?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve