java.lang.IllegalArgumentException: View not attached to window manager
2016-08-22 11:22
591 查看
公司项目线上bug:
stackoverflow.com上面相关内容:
http://stackoverflow.com/questions/22924825/view-not-attached-to-window-manager-crash http://stackoverflow.com/questions/2745061/java-lang-illegalargumentexception-view-not-attached-to-window-manager
修改项目里面代码:
onDestory中调用dismissProgressDialog
java.lang.IllegalArgumentException: View not attached to window manager at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:406) at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:308) at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:79) at android.app.Dialog.dismissDialog(Dialog.java:323) at android.app.Dialog$1.run(Dialog.java:119) at android.os.Handler.handleCallback(Handler.java:730) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5162) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method)
stackoverflow.com上面相关内容:
http://stackoverflow.com/questions/22924825/view-not-attached-to-window-manager-crash http://stackoverflow.com/questions/2745061/java-lang-illegalargumentexception-view-not-attached-to-window-manager
修改项目里面代码:
protected void startProgressDialog() { // showDialog(DIALOG_PROGRESS); if (progressDialog == null) { progressDialog = CommonDialogUtils.showLoadingDialog(this); } progressDialog.show(); } protected void dismissProgressDialog() { // removeDialog(DIALOG_PROGRESS); if (progressDialog != null && progressDialog.isShowing()) { progressDialog.dismiss(); } }
onDestory中调用dismissProgressDialog
@Override protected void onDestroy() {super.onDestroy(); dismissProgressDialog(); }
相关文章推荐
- 关于java.lang.IllegalArgumentException: View not attached to window manager 错误的分析
- decorview that was originally added here or java.lang.IllegalArgumentException: View not attached to window manager
- java.lang.IllegalArgumentException: View not attached to window manager问题
- java.lang.IllegalArgumentException: View not attached to window manager
- java.lang.IllegalArgumentException: View not attached to window manager
- bug_ _java.lang.IllegalArgumentException: View not attached to window manager
- java.lang.IllegalArgumentException: View not attached to window manager when dismissing dialog
- java.lang.IllegalArgumentException: View not attached to window manager when dismissing dialog
- java.lang.IllegalArgumentException: View not attached to window manager
- 使用Activity.isfinishing()解决java.lang.IllegalArgumentException: View not attached to window manager
- java.lang.IllegalArgumentException: View not attached to window manager解决办法
- bug_ _java.lang.IllegalArgumentException: View not attached to window manager 2
- 关于java.lang.IllegalArgumentException: View not attached to window manager 错误的分析
- java.lang.IllegalArgumentException: View not attached to window manager when dismissing dialog
- java.lang.illegalargumentexception view not attached to window manager 解决
- 使用Activity.isfinishing()解决java.lang.IllegalArgumentException: View not attached to window manager
- java.lang.IllegalArgumentException: View not attached to window manager
- java.lang.IllegalArgumentException - not attached to window manager
- android笔记之关于java.lang.IllegalArgumentException: View not attached to window manager 错误的分析
- illegalargumentexception: view not attached to window manager