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

来源:互联网 发布:php 5.3.2.tar.gz下载 编辑:程序博客网 时间:2024/05/16 19:55

在线程的run()的实现部分的开头写

Looper.prepare();

结尾写

Looper.loop();


详细原理可参见http://www.android123.com.cn/androidkaifa/422.html


原创粉丝点击