Android app hangs on restart (Appcelerator Titanium)

梦想与她 提交于 2019-12-11 08:02:07

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/40452206/android-app-hangs-on-restart-appcelerator-titanium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!