1.android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?,exceptionmsg:android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
崩溃可能是因为activity还未创建或者穿的context不是activity context
2.java.lang.IllegalArgumentException: View=DecorView@e97db5b[] not attached to window manager,exceptionmsg:java.lang.IllegalArgumentException: View=DecorView@e97db5b[] not attached to window manager
崩溃原因是:dialog调用dismiss方法时,activity isFinishing或者isDestroyed,使得dialog无法获取activity对应的window manager进而抛出异常