Only the original thread that created a view hierarchy can touch its views
2013-05-22 16:17
435 查看
在 子线程中 调用主线程中的回调函数, 回调函数会刷新UI, 运行提示此错误。
解决: 1。不在子线程中调用回调函数,改为发送消息,然后在主线程调用。
2. 修改回调函数,使一个类 包含回调函数且包含一个主线程handler,,然后直接在回调函数中刷新。
解决: 1。不在子线程中调用回调函数,改为发送消息,然后在主线程调用。
2. 修改回调函数,使一个类 包含回调函数且包含一个主线程handler,,然后直接在回调函数中刷新。
相关文章推荐
- 在工作线程中处理UI线程报错:Only the original thread that created a view hierarchy can touch its views.
- Only the original thread that created a view hierarchy can touch its views.
- calledfromwrongthreadexception only the original that created a view hierarchy can touch its views
- 浅析Android中的消息机制-解决:Only the original thread that created a view hierarchy can touch its views.
- 关于Only the original thread that created a view hierarchy can touch its views的解决方案
- 错误:Only the original thread that created a view hierarchy can touch its views——Handler的使用
- 浅析Android中的消息机制-解决:Only the original thread that created a view hierarchy can touch its views. .
- 错误:Only the original thread that created a view hierarchy can touch its views——Handler的使用
- Only the original thread that created a view hierarchy can touch its views的相关
- 开发错误记录1:解决:Only the original thread that created a view hierarchy can touch its views.
- Only the original thread that created a view hierarchy can touch its views:
- only the original thread that created a view hierarchy can touch its views解决方案
- android子线程控制UI线程,以防:Only the original thread that created a view hierarchy can touch its views.
- 错误:Only the original thread that created a view hierarchy can touch its views——Handler的使用
- Only the original thread that created a view hierarchy can touch its views.
- Only the original thread that created a view hierarchy can touch its views
- Android进阶——Handler的应用之解决Only the original thread that created a view hierarchy can touch its views
- 【Android】错误信息 Only the original thread that created a view hierarchy can touch its views
- Only the original thread that created a view hierarchy can touch its views.
- 完美解决Only the original thread that created a view hierarchy can touch its views