Unable to add window — token android.os.BinderProxy is not valid; is your activity running?
来源:互联网 发布:c语言之父丹尼斯里奇 编辑:程序博客网 时间:2024/04/29 18:39
现象是:第一次显示Dialog正常显示 ,但按了返回键后,再次进入程序显示Dialog时就会报错
原因:我把 对Dialog义为了static 变量 导致退出程序后,再次进入来显示Dialog时,此时的Dialog还是附着在原来退出的Activity,而原来的Activity已关闭,所以会出现此错误
修改:因其它方法必须要用 static 的 Dialog,不能去掉static修饰符,所以在关闭对话框时,加上一句 dialog=null; 给它重新符个空值,这样在显示Dialog前,判断为空时,会重新new一个新的Dialog,就不会报错了 。
0 0
- Unable to add window — token android.os.BinderProxy is not valid; is your activity running?
- Unable to add window — token android.os.BinderProxy is not valid; is your activity running?
- Unable to add window -- token android.os.BinderProxy@XXX is not valid; is your activity running?
- Unable to add window -- token android.os.BinderProxy@xxx is not valid; is your activity running
- 【遇见Android bug】Unable to add window -- token android.os.BinderProxy@4396ecc8 is not valid; is your a
- Android问题集(4):Unable to add window -- token android.os.BinderProxy@bf4921f is not valid;
- BadTokenException: Unable to add window -- token android.os.BinderProxy@438e7108 is not valid;
- Unable to add window -- token android.os.BinderProxy@164db98f is not valid解决办法f
- Unable to add window -- token android.os.BinderProxy@bf4921f is not valid
- Unable to add window -- token android.os.BinderProxy@bf4921f is not valid
- PopupWindow出现Unable to add window -- token null is not valid; is your activity running?
- PopWindow Unable to add window -- token null is not valid; is your activity running
- Unable to add window -- token null is not valid; is your activity running?
- Unable to add window --token is not valid; is your activity running?
- - Unable to add window -- token null is not valid; is your activity running?
- Unable to add window -- token null is not valid; is your activity running?
- unable to add window -- token null is not valid; is your activity running 错误解决办法
- PopupWindow出现Unable to add window -- token null is not valid; is your activity running?
- VS错误error C1083 和XX.pch错误
- VC++6.0 unexpected end of file while looking for precompiled header directive
- Hadoop MapReduce的模式、算法和用例
- 十五个数的排序
- Solve equation
- Unable to add window — token android.os.BinderProxy is not valid; is your activity running?
- 操作系统内存管理
- Linux中如何开启8080端口供外界访问
- MIPS cpu_save_nonscratch cpu_restore_nonscratch
- Eclipse打印Java的char默认值,出现方框原因
- MYSQL的常用命令和增删改查语句和数据类型
- strcpy_s 和 strcat_s的用法
- 如何优雅地使用NDK
- java线程同步——信号量(Semaphore)