android View not attached to window manager

后端 未结 13 2372
臣服心动
臣服心动 2020-11-27 10:29

I am having some of the following exceptions:

java.lang.IllegalArgumentException: View not attached to window manager
at android.view.WindowManagerImpl.findV         


        
13条回答
  •  猫巷女王i
    2020-11-27 10:54

    Why not try catch, like this:

    protected void onPostExecute(Object result) {
            try {
                if ((mDialog != null) && mDialog.isShowing()) {
                    mDialog.dismiss();
                }
            } catch (Exception ex) {
                Log.e(TAG, ex.getMessage(), ex);
            }
        }
    

提交回复
热议问题