0
這是什麼錯誤?BrowserActivity泄漏了窗口
11-25 09:38:33.233: ERROR/WindowManager(248): Activity com.android.browser.BrowserActivity has leaked window [email protected] that was originally added here
11-25 09:38:33.233: ERROR/WindowManager(248): android.view.WindowLeaked: Activity com.android.browser.BrowserActivity has leaked window [email protected] that was originally added here
11-25 09:38:33.233: ERROR/WindowManager(248): at android.view.ViewRoot.<init>(ViewRoot.java:227)
11-25 09:38:33.233: ERROR/WindowManager(248): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
11-25 09:38:33.233: ERROR/WindowManager(248): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
11-25 09:38:33.233: ERROR/WindowManager(248): at android.view.Window$LocalWindowManager.addView(Window.java:424)
11-25 09:38:33.233: ERROR/WindowManager(248): at com.android.browser.BrowserActivity.showFakeTitleBar(BrowserActivity.java:1037)
11-25 09:38:33.233: ERROR/WindowManager(248): at com.android.browser.BrowserActivity.access$2100(BrowserActivity.java:153)
11-25 09:38:33.233: ERROR/WindowManager(248): at com.android.browser.BrowserActivity$7.onPageStarted(BrowserActivity.java:2597)
11-25 09:38:33.233: ERROR/WindowManager(248): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:234)
11-25 09:38:33.233: ERROR/WindowManager(248): at android.os.Handler.dispatchMessage(Handler.java:99)
11-25 09:38:33.233: ERROR/WindowManager(248): at android.os.Looper.loop(Looper.java:123)
11-25 09:38:33.233: ERROR/WindowManager(248): at android.app.ActivityThread.main(ActivityThread.java:4363)
11-25 09:38:33.233: ERROR/WindowManager(248): at java.lang.reflect.Method.invokeNative(Native Method)
11-25 09:38:33.233: ERROR/WindowManager(248): at java.lang.reflect.Method.invoke(Method.java:521)
11-25 09:38:33.233: ERROR/WindowManager(248): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
11-25 09:38:33.233: ERROR/WindowManager(248): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
11-25 09:38:33.233: ERROR/WindowManager(248): at dalvik.system.NativeStart.main(Native Method)
現在我意識到,如果我打開一個從網站的URL,並解散窗口與該網頁之前,我按回來然後我得到這個錯誤。所以,我認爲我不能對這個錯誤做任何事情,......最好的部分是我沒有強迫關閉。 – Gabrielle
檢查窗口是否存在? ,onBackPressed()方法。如果有,然後解僱它並完成你的活動,或者如果沒有,那就完成你的活動。 – Pawan