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

来源:互联网 发布:测量长度的软件 编辑:程序博客网 时间:2024/06/06 01:53

1. 在报错的代码之前,调用Looper.prepare(),给线程创建消息循环

2. 在报错的代码之后,调用Looper.loop(),使消息循环起作用。


0 0
原创粉丝点击