Android 错误提示: Can't create handler inside thread that has not called Looper.prepare()

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

将 Handler handler = new Handler() 更为 Handler handler = new Handler(Looper.getMainLooper()).方可解决

也可以在run 之前 调用 Looper.prepare(); 来解决此类问题

原因可点击: 参考文章

posted @ 2014-03-05 15:36  一个学渣  阅读(143)  评论(0)    收藏  举报

 

CSDNGitHub 联系邮箱:aikongmeng@gmail.com


Copyright 2008-2019 Government All Rights Reserved