當(dāng)Activity已經(jīng)Finish了,還彈對話框的話,就會(huì)報(bào)這個(gè)錯(cuò)
創(chuàng)新互聯(lián)建站是專業(yè)的扎魯特旗網(wǎng)站建設(shè)公司,扎魯特旗接單;提供網(wǎng)站制作、網(wǎng)站設(shè)計(jì),網(wǎng)頁設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行扎魯特旗網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來合作!
· 1Caused by: android.view.WindowManager$BadTokenException:Unable to add window -- token android.os.BinderProxy@42b22048 is not valid; isyour activity running?
· 2 atandroid.view.ViewRootImpl.setView(ViewRootImpl.java:541)
· 3 atandroid.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:259)
· 4 atandroid.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
· 5 at android.app.Dialog.show(Dialog.java:286)
· 6 atcom.mama100.android.member.wxapi.WXPayHelper.showWXPayFailedDialog(WXPayHelper.java:88)
· 7 atcom.mama100.android.member.activities.mothershop.SubmitOrderActivity$3.onCheckStatusResponse(SubmitOrderActivity.java:941)
· 8 atcom.mama100.android.member.wxapi.CheckWXPayStatus$TaskCheckWXPayStatus.handleResponse(CheckWXPayStatus.java:55)
· 9 atcom.mama100.android.member.activities.AsyncReqTask.onPostExecute(AsyncReqTask.java:50)
· 10 at com.mama100.android.member.activities.AsyncReqTask.onPostExecute(AsyncReqTask.java:1)
解決辦法 :
在dialog初始化前先加判斷
if (mContext.isFinishing()) {
return;
}