android.view.WindowLeaked

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

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

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • GitHub comment 1#226866971
    via GitHub by eSigTech
    ,
  • GitHub comment 1#241363618
    via GitHub by akki10
    ,
  • Json parsing errors at android
    via Stack Overflow by Diego
    ,
    • android.view.WindowLeaked: Activity com.wordpress.priyankvex.easyocrscannerdemo.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{41f8c370 V.E..... R......D 0,0-304,96} that was originally added here at android.view.ViewRootImpl.<init>(ViewRootImpl.java:409) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:218) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) at android.app.Dialog.show(Dialog.java:281) at com.wordpress.priyankvex.easyocrscannerdemo.MainActivity.onOcrScanStarted(MainActivity.java:59) at com.wordpress.priyankvex.easyocrscannerdemo.ImageProcessingThread.onPreExecute(ImageProcessingThread.java:51) at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586) at android.os.AsyncTask.execute(AsyncTask.java:534) at com.wordpress.priyankvex.easyocrscannerdemo.EasyOcrScanner.onImageTaken(EasyOcrScanner.java:44) at com.wordpress.priyankvex.easyocrscannerdemo.MainActivity.onActivityResult(MainActivity.java:46) at android.app.Activity.dispatchActivityResult(Activity.java:5311) at android.app.ActivityThread.deliverResults(ActivityThread.java:3521) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3568) at android.app.ActivityThread.access$1100(ActivityThread.java:162) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5371) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at dalvik.system.NativeStart.main(Native Method)

    Users with the same issue

    filipebatista
    1 times, last one,
    Sacchi
    2 times, last one,
    Hiren Amaliyar
    1 times, last one,
    Indri Yunita
    8 times, last one,
    winer222
    1 times, last one,
    89 more bugmates