每个Android应用程序意外关闭

时间:2011-09-12 15:09:49

标签: android flash flex mobile builder

我开始构建一个Android应用程序并使用flash builder 4.5.1通过usb调试它,但过了一段时间它在我的android机器上说“应用程序意外关闭”。 奇怪的是,它不会崩溃。它只是说它崩溃了,但是当我点击'强制关闭'时,它就会像往常一样继续运行。

我只是尝试调试一个全新的flex移动项目,没有任何编码,几秒钟之后它也说它意外停止了。

我不知道我做错了什么,或者是否有更大的事情发生在这里。

1 个答案:

答案 0 :(得分:0)

我发现使用trace或Alert.show在这方面有所帮助,仅仅是因为暂停应用程序状态太长时间的麻烦可能会导致问题。

我使用自定义提醒 - 提供的示例

<fx:Declarations>
    <fx:Component className="AlertMsg">
        <s:SkinnablePopUpContainer x="70" y="300">
            <s:TitleWindow title="My Message" close="close()">
                <s:VGroup horizontalAlign="center" paddingTop="8" paddingBottom="8" paddingLeft="8" paddingRight="8" gap="5" width="100%">
                    <s:Label text="My alert message text here..."/>
                    <s:Button label="OK" click="close()"/>
                </s:VGroup>
            </s:TitleWindow>
        </s:SkinnablePopUpContainer>
    </fx:Component>
</fx:Declarations>

<s:layout>
    <s:VerticalLayout paddingTop="5" paddingBottom="5" paddingLeft="5" paddingRight="5" gap="10"
                      horizontalAlign="center" verticalAlign="top"/>
</s:layout>

<s:TextArea text="This sample shows how you can display a simple alert message in a mobile application using the Spark SkinnablePopUpContainer. The mx.controls.Alert is not recommended for mobile."
            width="98%" editable="false"/>
<s:Button label="Show Alert" click="(new AlertMsg()).open(this, false)"/>

相关问题