Only the original thread that created a view hierarchy can touch its views.
来源:互联网 发布:考试app软件 编辑:程序博客网 时间:2024/05/28 01:34
在Android 77.0的系统中,在子线程更新UI界面会产生如下异常:
android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views:
可以使用Handler等工具将更新信息发送到主界面,然后通过主界面来更新消息即可,亦可通过如下方法来避免:
runOnUiThread(new Runnable() { @Override public void run() { //更新UI消息 } });
0 0
- 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错误
- 报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错误相关
- 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的解决方案
- 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
- 关于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
- 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.
- spring的RequestContextListener有什么用
- 修改Eclipse因为系统权限异常:permission is only granted to system apps
- java 中char类型和 Unicode编码
- windows vim settings
- jquery获取checkbox值
- Only the original thread that created a view hierarchy can touch its views.
- uva 1632 Alibaba
- 启动tomcatError occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object
- 几种排序算法总结
- linux date格式化时间和日期
- 字符串搜索-java
- ubuntu部署flask项目
- MySQL学习笔记 -- day02 DML语法
- 集成第三方组件--七鱼客服