问题描述
我正在为Android制作一个应用程序.我遇到了奇怪的问题. 应用程序完美地工作,直到它关闭后按钮.如果是的话,而不是重新启动它是显示飞溅屏幕并变得不响应.在某些时间对话框之后(如果我要关闭应用程序)可能会显示. 它发生在任何代码中.例如:
var myApp = {}; alert(1); alert(2);
如果应用程序以艰难的方式关闭(第三个按钮并刷掉应用),而不是一切都很好.
在设备和模拟器上的每个Android版本中发生问题.在一些测试之后,我发现它发生在SDK 5.2.0和更新时.
有没有人遇到这样的问题?
当我在另一个答案中描述时,我解决了问题 appcelerator应用程序不重新启动(Android)在tiapp.xml中添加此属性:
<property name="ti.android.root.reappears.restart" type="bool">true</property>
在<ti:app>标签的根目录
问题描述
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.
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?
推荐答案
I solved the problem as I described in another answer Appcelerator app doesn't restart (Android)
Add this property in tiapp.xml:
<property name="ti.android.root.reappears.restart" type="bool">true</property>
in the root of the <ti:app> tag