android窗体溢出WindowManager$BadTokenException: Unable to add window -- token null is not for an applica

10-28 03:29:18.745: E/AndroidRuntime(1238): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application

1、由于Activity结束之前没关闭窗体
2、dialog不能使用getApplicationContext(),因为只有Activity才能添加窗体

在Activity结束,调用关闭窗体的方法
Dismiss();

posted @ 2016-07-01 17:35  iszengmh  阅读(96)  评论(0编辑  收藏  举报