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

查看:32
本文介绍了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>

标签的根目录

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

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