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(); 来解决此类问题

原因可点击: 参考文章

原文地址:https://www.cnblogs.com/aikongmeng/p/3697313.html