android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@47ddb860 is not valid; is your activity running? at android.view.ViewRootImpl.setView(ViewRootImpl.java:594) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:269) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) at android.app.Dialog.show(Dialog.java:323) at cn.beeba.app.activity.ChannelActivity.q(ChannelActivity.java:1034) at cn.beeba.app.activity.ChannelActivity.b(ChannelActivity.java:686) at cn.beeba.app.activity.ChannelActivity.b(ChannelActivity.java:662) at cn.beeba.app.activity.ChannelActivity$2.handleMessage(ChannelActivity.java:377) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5315) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)at dalvik.system.NativeStart.main(Native Method)
解决方法:
if(!((Activity) context).isFinishing()) { //show dialog }
Unable to add window -- token android.os.BinderProxy@xxx is not valid; is your activity running
最新推荐文章于 2023-01-06 20:47:01 发布