Unable to add window — token android.os.BinderProxy is not valid; is your activity running?

进入Activity在dialog还未来得及弹出时,立即点退出,会报这样的错误。

解决办法:

if(!((Activity) context).isFinishing())
{
    //show dialog
}


你可能感兴趣的:(dialog)