ERROR/WindowManager(***): Activity *** has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@*** that

本文 2011-05-27 09:41 发表于本人CSDN 博客 http://blog.csdn.net/lonkiss/article/details/6449284现迁移至博客园

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

本文原创 转载请注明出处


在做项目是遇到这个错误

google : WindowManager: Activity  has leaked window

在stackoverflow.com(链接http://stackoverflow.com/questions/2850573/activity-has-leaked-window-that-was-originally-added)中找到答案 

最佳答案是 You're trying to show dialog after you're exit activity ( your thread came back ). THere are like 5 question with same thing in the last two weeks

另外一个给我帮助的回答是

ERROR/WindowManager(***): Activity *** has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@*** that_第1张图片

看到以上回答后,我检查代码。发现在对话框中直接调用了finish方法,在finish前加了dismiss方法后,该错误解决。

你可能感兴趣的:(windowmanager)