2011-11-25 79 views
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) 

回答

0

這意味着你已經開始任何窗口(比如:警報或Dialog)在BrowserActivity,並駁回該窗口之前,你已經開始新的活動。

在開始新活動之前關閉該窗口。

+1

現在我意識到,如果我打開一個從網站的URL,並解散窗口與該網頁之前,我按回來然後我得到這個錯誤。所以,我認爲我不能對這個錯誤做任何事情,......最好的部分是我沒有強迫關閉。 – Gabrielle

+0

檢查窗口是否存在? ,onBackPressed()方法。如果有,然後解僱它並完成你的活動,或者如果沒有,那就完成你的活動。 – Pawan