1. 首页
  2. 数据库
  3. 其它
  4. 问题:android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original

问题:android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original

上传者: 2021-02-01 16:09:43上传 PDF文件 24.83KB 热度 33次
问题:android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a 我的场景是 LinearLayout.LayoutParams params11 = new LinearLayout.LayoutParams(264, LinearLayout.LayoutParams.WRAP_CONTENT); bt21.setLayoutParams(params11); 更新设置UI 问题的意思是更新UI阻塞了主线程 解决方法: 利用runOnUiThread
下载地址
用户评论