Can't toast on a thread that has not called Looper.prepare()
生活随笔
收集整理的这篇文章主要介绍了
Can't toast on a thread that has not called Looper.prepare()
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
这个错误说了就是子线程直接弹Toast
就说下我的处理方法
Looper.prepare();Toast.makeText(MainActivity.this, "11111", Toast.LENGTH_SHORT).show();Looper.loop();
这样就可了,
总结
以上是生活随笔为你收集整理的Can't toast on a thread that has not called Looper.prepare()的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 48寸的海尔电视换个屏多少钱
- 下一篇: ProgreassBar 60秒走完,