简体   繁体   English

崩溃后恢复活动的Android

[英]Android which activity resumed after crash

When my app crashes always the activity 2-3 activities back is started. 当我的应用程序崩溃时,活动2-3的活动总是返回。 Why is this? 为什么是这样? Can I change this to start always the most recent activity (before the crashing one, of course)? 我可以更改此项以始终启动最近的活动(当然,在崩溃之前)吗?

It may be because you called finish() method in the activity which is calling next activity which get crashed. 可能是因为您在调用下一个崩溃的活动的活动中调用了finish()方法。 Try to remove that finish() method from the calling activity. 尝试从调用活动中删除该finish()方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM