1
我有一個問題,當設備方向改變了很多次, 此日誌:如何處理加速強制關閉在Android
05-17 11:28:53.121: ERROR/WindowManager(284): Activity com.korekapi.ipay.activity.Search has leaked window [email protected] that was originally added here
05-17 11:28:53.121: ERROR/WindowManager(284): android.view.WindowLeaked: Activity com.korekapi.ipay.activity.Search has leaked window [email protected] that was originally added here
05-17 11:28:53.121: ERROR/WindowManager(284): at android.view.ViewRoot.<init>(ViewRoot.java:214)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.view.Window$LocalWindowManager.addView(Window.java:409)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.app.Dialog.show(Dialog.java:238)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.app.ProgressDialog.show(ProgressDialog.java:107)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.app.ProgressDialog.show(ProgressDialog.java:90)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.app.ProgressDialog.show(ProgressDialog.java:85)
05-17 11:28:53.121: ERROR/WindowManager(284): at com.korekapi.ipay.activity.Search$SearchTask.onPreExecute(Search.java:124)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.os.AsyncTask.execute(AsyncTask.java:391)
05-17 11:28:53.121: ERROR/WindowManager(284): at com.korekapi.ipay.activity.Search.doSearch(Search.java:101)
05-17 11:28:53.121: ERROR/WindowManager(284): at com.korekapi.ipay.activity.Search.onCreate(Search.java:70)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3502)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.app.ActivityThread.access$2200(ActivityThread.java:116)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1798)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.os.Handler.dispatchMessage(Handler.java:99)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.os.Looper.loop(Looper.java:123)
05-17 11:28:53.121: ERROR/WindowManager(284): at android.app.ActivityThread.main(ActivityThread.java:4203)
05-17 11:28:53.121: ERROR/WindowManager(284): at java.lang.reflect.Method.invokeNative(Native Method)
05-17 11:28:53.121: ERROR/WindowManager(284): at java.lang.reflect.Method.invoke(Method.java:521)
05-17 11:28:53.121: ERROR/WindowManager(284): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
05-17 11:28:53.121: ERROR/WindowManager(284): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
05-17 11:28:53.121: ERROR/WindowManager(284): at dalvik.system.NativeStart.main(Native Method)
因此如何克服加速度計,爲了不重裝/在刷新方向改變
感謝提前