您的位置:首页 > 编程语言 > Java开发

java.lang.RuntimeException:Can‘t create handler inside thread that has not called Looper.prepare()

2014-05-21 14:16 603 查看
用handler时,出现这个异常。
handler的创建需要在主线程中,当在子线程中创建handler时会报这个错误

我是在子线程中创建Toast时报错的

参考
http://blog.csdn.net/stonecao/article/details/6417364
http://www.oschina.net/question/163910_31439
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android handler
相关文章推荐