Can't create handler inside thread that has not called Looper.prepare()

问题:使用了thread,asyncTask在其中使用了toast等更新ui

解决办法:1.使用handler来发送消息,在主线程中更新ui

       2.在报错的方法前加上Looper.prepare();   末尾加上Looper.loop();

 

 

REFERENCES:http://sdlqhjk.iteye.com/blog/1112204

posted @ 2012-11-19 16:08  Atlas's blog  阅读(472)  评论(0编辑  收藏  举报