android 6.0+ java.lang.IllegalStateException did not call finish() prior to onResume() completing

来源:互联网 发布:matlab破解软件 编辑:程序博客网 时间:2024/05/18 10:22

解决方法:

1、更换该activity主题:

将:android:theme="@android:style/Theme.NoDisplay"

更改为 :android:theme="@android:style/Theme.Translucent.NoTitleBar"/>


2、在生命周期onResume()方法之前,调用finish()方法

个人填的一个坑,在onCreate()方法中处理完逻辑后,调用finish(),依然报错,搞到最后,发现onCreate用的是两个参数的那个,根本就不走,坑人啊!


3、在onResume()之前设置 setVisible(true)

不过就显示黑屏了,最后选择第二种解决方法。


阅读全文
0 0
原创粉丝点击