I have a Game Activity
(Activity A) that works well with all the code. Then I create a new Activity
(Activity B) for my new game mode, that extends
Activity A. However, when encounter the Toast line, Activity B suddenly thrown an exception (Activity A works well showing the Toast):
Can't create handler inside thread that has not called Looper.prepare()
Activity B only overrides a load-level method, no any differrence!
Try this:
There may be an easier way to handle the problem. Please refer to Android – Multithreading in a UI environment documentation.