2

What is this error, and why does it happen? The sdk is 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)

When I run the app, the app will automatically shut down.Pop-up exception.

Zamani
  • 306
  • 3
  • 15
user1528011
  • 21
  • 1
  • 2

2 Answers2

1

Look at this post

toddler safe app on android

I think it may help, he gets the same error.

java.lang.IllegalArgumentException: Window type can not be changed after the window is added
Community
  • 1
  • 1
reixa
  • 6,903
  • 6
  • 49
  • 68
  • http://mono-for-android.1047100.n5.nabble.com/Window-DecorView-Visibility-and-TabActivity-td5711047.html Look at the comment from Christian. He sais that he doesn't get that error when he choose android 2.3 (level 10) and not the 4.0. Try that. – reixa Sep 23 '12 at 19:49
  • yea i am facing the same...in GB its works but in ICS its not...but i need to compile for level 15 and run for ics.. – Jeegar Patel Sep 24 '12 at 04:57
  • please see http://stackoverflow.com/questions/12560180/what-does-this-4-line-java-code-means-in-android-application – Jeegar Patel Sep 24 '12 at 07:31
0

If you would like to do Android specific version execution then read the API at: http://developer.android.com/reference/android/os/Build.html

and look for a property that can help you.

JoxTraex
  • 13,423
  • 6
  • 32
  • 45