Android leaked window?
I have an error saying t开发者_如何学Pythonhat
Activity com.my.app has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@46010128 that was originally added here
I saw many other answers saying that I need to dismiss the dialog before finishing, but the error occurs when my app is still running. What I do is create a dialog, then run process on a different thread. At the end of the thread I send a message to a handler to close the dialog. When running, I see the dialog for a second, then the app force closes. What is going on?
You need to close all windows you have created before returning from onDestroy().
You haven't given the stack crawl of the exception causing your app to crash so nobody call help you with that.
精彩评论