android error: Can't create handler inside thread that has not called Looper.prepare() [duplicate]
I have an error from users of the android Market. I have no idea when this error occurs . The simulator and test phone runs the app perfectly! Any1 any idea where to begin looking? Thanks !
this is the error:
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.(Handler.java:121) at android.view.ViewRoot.(ViewRoot.java:259) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) at andr开发者_开发技巧oid.view.Window$LocalWindowManager.addView(Window.java:430) at android.app.Dialog.show(Dialog.java:288) at be.test.testerd$1.run(testscreen.java:103)
This can occur, if you have used AsyncTask and in doBackground() method is not called on Main UI thread, and calling a Toast or anyother thing which runs on Main UI thread.
精彩评论