崩溃解决方案 有更新!

  aohanyao

1.Activity被销毁弹出窗口而崩溃

描述

android.view.WindowManager$BadTokenException: 
Unable to add window -- token android.os.BinderProxy@42a40b58 is not valid; 
is your activity running?

解决方案

if(!((Activity) context).isFinishing())
	//弹出dialog
}

2. Fragment必须要留有一个空的构造方法

描述

make sure class name exists, is public, and has an empty constructor that is public

软广

来都来了,就给个关注吧,时不时会悄悄的推送一些小技巧的文章~~!
FullScreenDeveloper