android.view.WindowManager$BadTokenException: Unable to add window
2013-03-31 22:01
781 查看
错误:
android.view.WindowManager$BadTokenException: Unable to add window -- token android.app.LocalActivityManager$LocalActivityRecord@435def20
is not valid; is your activity running? at android.view.ViewRoot.setView......
发生环境:
在一个tabActivity里面嵌套一个tabAcitivity, 如果在子tabActivity里面显示AlertDialog的话,就会引发此错误。
解决方法:
AlertDialog.Builder(xxx.this) => AlertDialog.Builder(this.getParent())
android.view.WindowManager$BadTokenException: Unable to add window -- token android.app.LocalActivityManager$LocalActivityRecord@435def20
is not valid; is your activity running? at android.view.ViewRoot.setView......
发生环境:
在一个tabActivity里面嵌套一个tabAcitivity, 如果在子tabActivity里面显示AlertDialog的话,就会引发此错误。
解决方法:
AlertDialog.Builder(xxx.this) => AlertDialog.Builder(this.getParent())
相关文章推荐
- Caused by: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
- android.view.WindowManager$BadTokenException: Unable to add window --Unabletoaddwindow--tokenandroid
- [ERROR]android.view.WindowManager$BadTokenException: Unable to add window — token null
- android.view.WindowManager$BadTokenException: Unable to add window — token null is not for an applic
- android.view.WindowManager$BadTokenException: Unable to add window — token null
- android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an appli
- android.view.WindowManager$BadTokenException: Unable to add window -- token
- android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@4
- android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@4
- android.view.WindowManager$BadTokenException: Unable to add window(转)
- android.view.WindowManager$BadTokenException: Unable to add window — token null is not for an appli
- android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@4
- android.view.WindowManager$BadTokenException: Unable to add window — token null
- android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an appli
- android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is yo
- android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an appli
- 解决: android.view.WindowManager BadTokenException:Unable to add Window.Is your activity running?
- 试用dialog时碰到android.view.WindowManager$BadTokenException: Unable to add window — token null
- android spinner点击android.view.WindowManager$BadTokenException: Unable to add window token is not va
- 异常:android.view.WindowManager$BadTokenException: Unable to add window