我開發了一個Android應用程序。它在4.4版本的手機中工作正常,但是當我在具有版本2.2的手機上運行它時,它顯示以下錯誤消息。Android版本2.2的錯誤對話框
任何人都可以幫助我在此請
11-21 13:53:14.679: E/WindowManager(29791): Activity com.example.smart_survey.QR has leaked window [email protected] that was originally added here
11-21 13:53:14.679: E/WindowManager(29791): android.view.WindowLeaked: Activity com.example.smart_survey.QR has leaked window [email protected] that was originally added here
11-21 13:53:14.679: E/WindowManager(29791): at android.view.ViewRoot.<init>(ViewRoot.java:263)
11-21 13:53:14.679: E/WindowManager(29791): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:171)
11-21 13:53:14.679: E/WindowManager(29791): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:114)
11-21 13:53:14.679: E/WindowManager(29791): at android.view.Window$LocalWindowManager.addView(Window.java:424)
11-21 13:53:14.679: E/WindowManager(29791): at android.app.Dialog.show(Dialog.java:241)
11-21 13:53:14.679: E/WindowManager(29791): at com.example.smart_survey.QR$Logs.onPreExecute(QR.java:362)
11-21 13:53:14.679: E/WindowManager(29791): at android.os.AsyncTask.execute(AsyncTask.java:391)
11-21 13:53:14.679: E/WindowManager(29791): at com.example.smart_survey.QR$UpdateScore.onPostExecute(QR.java:255)
11-21 13:53:14.679: E/WindowManager(29791): at com.example.smart_survey.QR$UpdateScore.onPostExecute(QR.java:1)
11-21 13:53:14.679: E/WindowManager(29791): at android.os.AsyncTask.finish(AsyncTask.java:417)
11-21 13:53:14.679: E/WindowManager(29791): at android.os.AsyncTask.access$300(AsyncTask.java:127)
11-21 13:53:14.679: E/WindowManager(29791): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
11-21 13:53:14.679: E/WindowManager(29791): at android.os.Handler.dispatchMessage(Handler.java:99)
11-21 13:53:14.679: E/WindowManager(29791): at android.os.Looper.loop(Looper.java:130)
11-21 13:53:14.679: E/WindowManager(29791): at android.app.ActivityThread.main(ActivityThread.java:3687)
11-21 13:53:14.679: E/WindowManager(29791): at java.lang.reflect.Method.invokeNative(Native Method)
11-21 13:53:14.679: E/WindowManager(29791): at java.lang.reflect.Method.invoke(Method.java:507)
11-21 13:53:14.679: E/WindowManager(29791): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
11-21 13:53:14.679: E/WindowManager(29791): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
11-21 13:53:14.773: E/AndroidRuntime(29791): FATAL EXCEPTION: main
11-21 13:53:14.773: E/AndroidRuntime(29791): java.lang.IllegalArgumentException: View not attached to window manager
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:378)
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:223)
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.view.Window$LocalWindowManager.removeView(Window.java:432)
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.app.Dialog.dismissDialog(Dialog.java:278)
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.app.Dialog.access$000(Dialog.java:71)
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.app.Dialog$1.run(Dialog.java:111)
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.app.Dialog.dismiss(Dialog.java:268)
11-21 13:53:14.773: E/AndroidRuntime(29791): at com.example.smart_survey.QR$Logs.onPostExecute(QR.java:420)
11-21 13:53:14.773: E/AndroidRuntime(29791): at com.example.smart_survey.QR$Logs.onPostExecute(QR.java:1)
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.os.AsyncTask.finish(AsyncTask.java:417)
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.os.AsyncTask.access$300(AsyncTask.java:127)
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.os.Handler.dispatchMessage(Handler.java:99)
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.os.Looper.loop(Looper.java:130)
11-21 13:53:14.773: E/AndroidRuntime(29791): at android.app.ActivityThread.main(ActivityThread.java:3687)
11-21 13:53:14.773: E/AndroidRuntime(29791): at java.lang.reflect.Method.invokeNative(Native Method)
11-21 13:53:14.773: E/AndroidRuntime(29791): at java.lang.reflect.Method.invoke(Method.java:507)
11-21 13:53:14.773: E/AndroidRuntime(29791): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
11-21 13:53:14.773: E/AndroidRuntime(29791): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
11-21 13:53:14.773: E/AndroidRuntime(29791): at dalvik.system.NativeStart.main(Native Method)
請張貼一些代碼。 – 2014-11-21 13:10:42