Dialog中使用handler时报:Can't create handler inside thread that has not called Looper.prepare()
来源:互联网 发布:手机音频合成软件 编辑:程序博客网 时间:2024/04/30 02:18
Dialog中使用handler时报:Can't create handler inside thread that has not called Looper.prepare()
dialog的show方法前后加,Looper.prepare();和Looper.loop();即可
但这样会扰乱 Looper的运行机制,在主线程中就不行在使用handler了
建议用其他方式代替Dialog中的handler。
1 0
- Dialog中使用handler时报:Can't create handler inside thread that has not called Looper.prepare()
- 使用ClipboardManager碰到Can't create handler inside thread that has not called Looper.prepare()
- 使用okhttp 报Can't create handler inside thread that has not called Looper.prepare()
- Handler——Can't create handler inside thread that has not called Looper.prepare()
- 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() inside AsyncTask
- 在子线程中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()
- 在子线程中new Handler报错--Can't create handler inside thread that has not called Looper.prepare()
- 解决使用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()错误的解决
- Can't create handler inside thread that has not called Looper.prepare() 异常
- Can't create handler inside thread that has not called Looper.prepare()
- Can’t create handler inside thread that has not called Looper.prepare()
- Can’t create handler inside thread that has not called Looper.prepare()
- Can't create handler inside thread that has not called Looper.prepare()解决办法
- Can't create handler inside thread that has not called Looper.prepare() 终极解决方法
- 异常Can't create handler inside thread that has not called Looper.prepare() 解决方法
- python提取知乎首页问答的url
- 第7周-项目1-成员函数、友元函数和一般函数有区别
- Cocos2d-x 3.9教程:10.使用CocosStudio的UI编辑器从UI文件中加载布局和控件
- 面试问题--数据安全分析师
- UVA699(树)
- Dialog中使用handler时报:Can't create handler inside thread that has not called Looper.prepare()
- Android中WebView播放网上视频,横竖屏切换
- 51单片机实现串口收发
- .NET实验6-4
- VS编译gtest和gmock, 讲解并使用
- numpy.mean() 计算矩阵均值
- leetcode---Binary Tree Level Order Traversal
- LeetCode-129.Sum Root to Leaf Numbers
- GCJ 2008 Round1A Problem A. Minimum Scalar Product