这是什么错误,为什么会发生? sdk是4.0.3。
07-16 14:00:03.090: E/AndroidRuntime(29487): FATAL EXCEPTION: main
07-16 14:00:03.090: E/AndroidRuntime(29487): java.lang.IllegalArgumentException: Window type can not be changed after the window is added.
07-16 14:00:03.090: E/AndroidRuntime(29487): at android.os.Parcel.readException(Parcel.java)
07-16 14:00:03.090: E/AndroidRuntime(29487): at android.os.Parcel.readException(Parcel.java)
07-16 14:00:03.090: E/AndroidRuntime(29487): at android.view.IWindowSession$Stub$Proxy.relayout(IWindowSession.java)
07-16 14:00:03.090: E/AndroidRuntime(29487): at android.view.ViewRootImpl.relayoutWindow(ViewRootImpl.java)
07-16 14:00:03.090: E/AndroidRuntime(29487): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java)
07-16 14:00:03.090: E/AndroidRuntime(29487): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java)
07-16 14:00:03.090: E/AndroidRuntime(29487): at android.os.Handler.dispatchMessage(Handler.java)
07-16 14:00:03.090: E/AndroidRuntime(29487): at android.os.Looper.loop(Looper.java)
07-16 14:00:03.090: E/AndroidRuntime(29487): at android.app.ActivityThread.main(ActivityThread.java)
07-16 14:00:03.090: E/AndroidRuntime(29487): at java.lang.reflect.Method.invokeNative(Native Method)
07-16 14:00:03.090: E/AndroidRuntime(29487): at java.lang.reflect.Method.invoke(Method.java)
07-16 14:00:03.090: E/AndroidRuntime(29487): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
07-16 14:00:03.090: E/AndroidRuntime(29487): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
07-16 14:00:03.090: E/AndroidRuntime(29487): at dalvik.system.NativeStart.main(Native Method)
当我运行应用程序时,应用程序将自动关闭.Pop-up exception。
答案 0 :(得分:1)
看看这篇文章
我认为这可能会有所帮助,他也会遇到同样的错误。
java.lang.IllegalArgumentException: Window type can not be changed after the window is added
答案 1 :(得分:0)
如果您想要执行Android特定版本,请阅读以下网址:http://developer.android.com/reference/android/os/Build.html
并寻找可以帮助您的财产。