我有一个数据包侦听器,可以检测数据包何时到达,并且ArrayAdapter
在发生这种情况时需要刷新。问题是,如果我尝试访问该adapter.notifyDataSetChanged()
方法,则会引发异常:
Exception in packet listener: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
有任何想法吗?