网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  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问题解决方法

分类: IT文章 • 2022-08-27 12:19:57

原因是只有创建这个view的线程才能触碰到它的views,解决办法是使用runOnUiThread():

        MainActivity.this.runOnUiThread(new Runnable() {
            public void run() {
                ...
            }
        });

相关推荐

  • 转:出错:Only the original thread that created a view hierarchy can touch its views
  • andriod 错误: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
  • Android 之 异常处理Only the original thread that created a view hierarchy can touch
  • 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——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——Handler的使用
  • lombok插件的简单使用
  • vue $emit、$on、$refs简介    
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号