Can't create handler inside thread that has not called Looper.prepare()
Posted white-knight
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Can't create handler inside thread that has not called Looper.prepare()相关的知识,希望对你有一定的参考价值。
参考 https://blog.csdn.net/sunhuaqiang1/article/details/46839045
Looper.prepare();
Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();
Looper.loop();
以上是关于Can't create handler inside thread that has not called Looper.prepare()的主要内容,如果未能解决你的问题,请参考以下文章
在子线程中new Handler报错--Can't create handler inside thread that has not called Looper.prepare()(示例代码
转 在子线程中new Handler报错--Can't create handler inside thread that has not called Looper.prepare()(示例
Can't create handler inside thread that has not called Looper.prepare()
Android开发:Can't create handler inside thread that has not线程问题解决
Android handler 报错处理Can't create handler inside thread that has not called Looper.prepare()(示例代码
Can't create handler inside thread that has not called Looper.prepare()