Android应用程序在重新启动时挂起(Appcelerator Titanium) [英] Android app hangs on restart (Appcelerator Titanium)

查看:110
本文介绍了Android应用程序在重新启动时挂起(Appcelerator Titanium)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Android开发一个应用.我遇到了奇怪的问题. 应用程序可以完美运行,直到使用后退"按钮将其关闭.如果是这样,则重新启动后,它会显示启动屏幕并变得无响应.一段时间后,可能会出现对话框(如果我想关闭该应用程序). 任何代码都会发生这种情况.例如:

I am making an app for Android. I encountered strange issue. Application works perfectly until it is closed with back button. If so, than after restart it is showing splash screen and becoming non-responsive. After some time dialog (if I want to close the app) may show. It happens with any code. For example:

var myApp = {};
alert(1);
alert(2);

如果应用程序以困难的方式关闭(第三个按钮,然后将应用程序滑出),则一切正常.

If app is closed in hard way (third button and swiping app out) than everything is fine.

设备和模拟器上的每个Android版本均会出现问题.经过一些测试,我发现它出现在SDK 5.2.0及更高版本上.

Problem occurs on every Android version both on device and simulator. After some test I found it occurs on SDK 5.2.0 and newer.

有人遇到这样的问题吗?

Did anyone encounter such problem?

推荐答案

我解决了另一个答案中描述的问题 Appcelerator应用无法重新启动(Android)

I solved the problem as I described in another answer Appcelerator app doesn't restart (Android)

在tiapp.xml中添加此属性:

Add this property in tiapp.xml:

<property name="ti.android.root.reappears.restart" type="bool">true</property>

位于<ti:app>标记的根

这篇关于Android应用程序在重新启动时挂起(Appcelerator Titanium)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆