java.lang.IllegalArgumentException: View not attached to window manager
公司项目线上bug:
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的更多相关文章
- 关于java.lang.IllegalArgumentException: View not attached to window manager 错误的分析
今天遇到一个很奇特的问题,当用户设置了PIN码,在锁屏界面正常解锁PIN码后,进入Launcher时显示com.android.phone 已停止运行.一开始猜想会不会是解锁PIN码的时候处理导致了P ...
- decorview that was originally added here or java.lang.IllegalArgumentException: View not attached to window manager
使用Dialog的时候,没少出现下面这两个报错 12-11 17:47:49.776: E/WindowManager(11461): android.view.WindowLeaked: Activ ...
- bug_ _java.lang.IllegalArgumentException: View not attached to window manager 2
今天遇到一个很奇特的问题,当用户设置了PIN码,在锁屏界面正常解锁PIN码后,进入Launcher时显示com.android.phone 已停止运行.一开始猜想会不会是解锁PIN码的时候处理导致了P ...
- bug_ _java.lang.IllegalArgumentException: View not attached to window manager
============= 1 view not attached to window manager 转自:http://hi.baidu.com/spare_h/blog/item/7fa3e ...
- Android中 View not attached to window manager错误的解决办法
前几日出现这样一个Bug是一个RuntimeException,详细信息是这样子的:java.lang.IllegalArgumentException: View not attached to w ...
- View not attached to window manager
java.lang.IllegalArgumentException: View not attached to window manager 在用ProgressDialog的时候,任务结束后Dis ...
- 关于dialog引起的 java.lang.IllegalArgumentException: View=com.android.internal.policy.impl.PhoneWindow$DecorView not attached to window manager 错误的分析
在跑Monkey测试的时候出现了一个比较特别的问题,先来看看Log: // CRASH: com.meizu.media.painter (pid 12491) // Short Msg: java. ...
- View not attached to window manager crash 的解决办法
View not attached to window manager crash 的解决办法 转自:http://stackoverflow.com/questions/22924825/view- ...
- java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@450b2f48 异常处理
晕死的错误,改了半天也没想到是这样的原因,基础正要呀... 先看一下警告信息: 07-07 08:32:19.540: WARN/WindowManager(74): Failed looking u ...
随机推荐
- Unknown
鉴于自己的直觉总是很准,所以这次再相信一次好了 T1:我觉得极有可能考到的是 1.对于栈,队列的模拟: 2.数论(不是像gcd那样的题目,而是加法原理乘法原理斥容,或是极具数学推导的东西,当然有可能用 ...
- Vijos1055 奶牛浴场(极大化思想求最大子矩形)
思路详见 王知昆<浅谈用极大化思想解决最大子矩形问题> 写得很详细(感谢~....) 因为不太会用递推,所以用了第一种方法,时间复杂度是O(n^2),n为枚举的点数,对付这题绰绰有余 思路 ...
- MongoDB学习之--安全和认证
MongoDB学习之--安全和认证 本文主要介绍两部分内容,Mongodb的安全检查配置以及安全认证操作: 虽然确保系统安全是系统管理员的重要工作,但是作为程序员了解其机制也是大有好处的,毕竟不是每个 ...
- Gink掉过的坑(一):将CCTableView导入到lua中
环境: 系统:win7 64位 cocos2dx:cocos2d-2.1rc0-x-2.1.3 Visual Studio: 2012 由于项目是用lua写的,需要将cocos2dx中的方法导入到lu ...
- 彻底抛弃PeopleEditor,SharePoint中利用Jquery Chosen创建新的人员选择器
彻底抛弃PeopleEditor,SharePoint中利用Jquery Chosen创建新的人员选择器 基于SharePoint平台开发时,人员选择器使用频率是非常高的,但是原生的人员选择器使用太麻 ...
- Excel 开发概述
浅谈Excel开发:一 Excel 开发概述 做Office相关的开发工作快一年多了,在这一年多里,在插件的开发中遇到了各种各样的问题和困难,还好同事们都很厉害,在和他们的交流讨论中学到了很多的知识. ...
- Static 单例模式
Static 方法的问题 今天在看EhCache源码的时候,发现有一个这样的方法 这个是个典型的单例模式的工具类,但我所知道的单例模式的写法不是这样的,虽然<effect java>中 ...
- 横瓜先生关于如何利用MYSQL数据库设计CMS系统处理100亿级TB规模的数据量
遥执乾坤(44758121) 18:21:23 mysql据说只能使用一个索引,我这里几乎所有字段都有索引. 但每个字段就算用索引,也需要扫描至少100w以上记录. 横瓜(601069289) 1 ...
- Markdown写作
What is markdown? Markdown 是一种轻量级的「标记语言」,它的优点很多,目前也被越来越多的写作爱好者,撰稿者广泛使用.看到这里请不要被「标记」.「语言」所迷惑,Markdown ...
- IK分词器 IKAnalyzer 简单demo
所用IKAnalyzer:IK-Analyzer-2012FF 百度云:http://pan.baidu.com/s/1bne9UKf 实例代码: package com.test.ik.anal ...