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

E/AndroidRuntime(26639): Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()


在报错的方法前加Looper.prepare(); 
方法末尾加Looper.loop();


很简单吧



你可能感兴趣的:(Can't create handler inside thread that has not called Looper.prepare() 终极解决方法)