android.view.WindowLeaked: Activity com.xxxxxxxx.xxxx.DataActivity has leaked window com.android.internal.policy.PhoneWindow$DecorView{afa2ab V.E...... R......D 0,0-1026,483} that was originally added here
Searched on Google with the first line of a JAVA stack trace?
We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.
Recommended solutions based on your search
Samebug tips
Close (finish) a Activity before, to ensure that the subsidiary in the above Dialog or PopupWindow have been closed (dismiss). Is also available at OnCreateDialog (Dialog) to create, let the system to manage the dialog box
Occurs due to dialogs which are not dismissed properly and if your activity has been destroyed but your dialog is still showing. Dismiss on activity's onDestroy().
if (dialog != null) { dialog.dismiss(); dialog = null; }
Solutions on the web
via Stack Overflow by HunTer AnDone
, 1 year agovia Stack Overflow by KJEjava48
, 1 year agovia Stack Overflow by Devika
, 10 months agovia Stack Overflow by Sandipkumar Savani
, 1 year agovia Stack Overflow by Jonas452
, 1 year agovia Stack Overflow by cole
, 1 year agoandroid.view.WindowLeaked: Activity com.xxxxxxxx.xxxx.DataActivity has leaked window com.android.internal.policy.PhoneWindow$DecorView{afa2ab V.E...... R......D 0,0-1026,483} that was originally added here
at android.view.ViewRootImpl.
(ViewRootImpl.java:372) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:299)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:86)
at android.app.Dialog.show(Dialog.java:326)
at com.xxxxxxxx.xxxx.DataActivity$MyAsyncTaskGetNews.onPreExecute(DataActivity.java:105)
at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:604)
at android.os.AsyncTask.execute(AsyncTask.java:551)
at com.xxxxxxxx.xxxx.DataActivity$1.onClick(DataActivity.java:87)
at android.view.View.performClick(View.java:5280)
at android.view.View$PerformClick.run(View.java:21239)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:5526)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)