我正在开发 android 2.2 froyo 应用程序。当我运行我的应用程序 android 2.2,3.0 时完美运行。但是当我在 android 4.0 及更高版本上运行时,我给出了一个错误。不幸的是,应用程序已停止。请帮助我如何解决错误。
08-03 16:19:36.602: E/AndroidRuntime(581): FATAL EXCEPTION: main
08-03 16:19:36.602: E/AndroidRuntime(581): java.lang.IllegalArgumentException: Window type can not be changed after the window is added.
08-03 16:19:36.602: E/AndroidRuntime(581): at android.os.Parcel.readException(Parcel.java:1331)
08-03 16:19:36.602: E/AndroidRuntime(581): at android.os.Parcel.readException(Parcel.java:1281)
08-03 16:19:36.602: E/AndroidRuntime(581): at android.view.IWindowSession$Stub$Proxy.relayout(IWindowSession.java:634)
08-03 16:19:36.602: E/AndroidRuntime(581): at android.view.ViewRootImpl.relayoutWindow(ViewRootImpl.java:3586)
08-03 16:19:36.602: E/AndroidRuntime(581): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1185)
08-03 16:19:36.602: E/AndroidRuntime(581): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
08-03 16:19:36.602: E/AndroidRuntime(581): at android.os.Handler.dispatchMessage(Handler.java:99)
08-03 16:19:36.602: E/AndroidRuntime(581): at android.os.Looper.loop(Looper.java:137)
08-03 16:19:36.602: E/AndroidRuntime(581): at android.app.ActivityThread.main(ActivityThread.java:4424)
08-03 16:19:36.602: E/AndroidRuntime(581): at java.lang.reflect.Method.invokeNative(Native Method)
08-03 16:19:36.602: E/AndroidRuntime(581): at java.lang.reflect.Method.invoke(Method.java:511)
08-03 16:19:36.602: E/AndroidRuntime(581): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
08-03 16:19:36.602: E/AndroidRuntime(581): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
08-03 16:19:36.602: E/AndroidRuntime(581): at dalvik.system.NativeStart.main(Native Method)
Logcat
错误就像:不幸的是应用程序已停止