首页 > 代码库 > android异常:android.view.ViewRootImpl$CalledFromWrongThreadException

android异常:android.view.ViewRootImpl$CalledFromWrongThreadException

android异常:android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.

出现这个异常的原因是你在子线程中修改了主线程中的组件的状态或数据。

android规定:只有在原始线程中(主线程,UI线程)才能修改显示组件。

android异常:android.view.ViewRootImpl$CalledFromWrongThreadException