http://androiddeveloper.diandian.com/post/2011-07-11/2817890
引用
郁闷的Bug,终于解决了,分享一下解决方案!
错误:
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())
http://androiddada.iteye.com/blog/1243273
分享到:
相关推荐
PopupWindow组件的使用问题,PopupWindow是一个阻塞对话框,如果你直接在Activity创建的方法中显示它,则会报错:android.view.WindowManager$BadTokenException:Unable to add window -- token null is not valid;...
k8s Unable to connect to the server: x509: certificate is valid for问题解决
解决PopupWindow嵌套PopupWindow报的异常Unable to add window
配置tomcat7sqlserver数据连接池java 利用数据源对象建立数据库连接时的错误: Name jdbc is not bound in this Context 解决方案
亲测解决tomcat9.08搭配jkd9,搭建servlet环境。常见问题是,The required Server component failed to start so Tomcat is unable to start。这个问题,直接通过配置eclipse来解决这个问题。
NULL 博文链接:https://hyl198611.iteye.com/blog/1988113
ERROR/AndroidRuntime(888): android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRoot$W@44ef1b68 is not valid; is your activity running? 报错的意思大概就是说...
android 9.0及其以上版本手机 操作数据库,再打开数据库db文件出现 “File opened that is not a database file file is encrypted or is not a database”android 9.0以下的版本 不会出现。 原因及解决方法。
Name salesDataSource is not bound in this Context,连接池的问题
Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 1. 下载文件native.rar 并解压 2. 用SecureFX 上传, 替换native目录下文件,选择二进制文件上传。 3. ...
##ERROR: Cause: unable to find valid certification path to requested target终极解决方法 各位兄弟,觉得我的方法有用,可以赞我一下的呦 如果你是和我一样安装完Android studio,运行第一个Android程序,发现...
tomcat报错Unable to find 'struts multipart saveDir解决
运行UG提示Fatal error detected unable to continue的解决方法
VC6 add files to project失效解决方法
aspen出现unable to acquire aspen plus license的解决方法
HASP按照文件解决H0033错误,Unable to access HASP SRM Run-time Environment? (H0033)
Unable to load class ‘javax.xml.bind.JAXBException‘(csdn)
Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder! 问题的缺失文件 eclipse.buildId=M20100211-1343 java.version=1.6.0_10-rc2 java.vendor=Sun Microsystems Inc. ...
tool.jar下载Unable to create schema compiler需要加载tool.jar的同学们。
参考: ...目录 一、更改镜像 二、手动将需要的插件和依赖下载放到本地厂库 三、下载阿里网站的资格证书,安装到jdk 四、设置maven的VM属性,这个...从https://start.spring.io/生成的spring boot项目,报错unable to f