之前遇到过这样的问题, 04-12 10:40:33.302: E/AndroidRuntime(17213): Caused by: android.view.WindowManager$BadTokenException: Unable to add window — token null is not for an application 04-12 10:40:33.302: E/AndroidRuntime(17213): at android.view.ViewRoot.setVie…
========4 关于android的一个常见错误:Unable to add window --token is not valid android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@41791b20 is not valid; is your activity running?at android.view.ViewRootImpl…
原博客地址:http://aijiawang-126-com.javaeye.com/blog/662336 在Activity中newSpinner是我把mContext传入,但是出了 android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application这个错误,参考了达人的文章终于搞定. private Context mcontext; @Ov…
下午摆弄ProgressDialog,进入就抛错:android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application,让我百思不得其解.我这使用这种方法实现的进度对话框:proDialog = ProgressDialog.show(getApplicationContext(), "sadfs", "dddddd",tr…
在广播中启动一个Dialog时出现如下错误信息:Caused by: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application 在代码中添加了dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);错误信息没有消除, 此时在Manifest.xml文件中…