Android 报错 android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that c

E/AndroidRuntime: FATAL EXCEPTION: Thread-6
Process: com.hzy.mhyc, PID: 14555
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:8632)
at android.view.ViewRootImpl.focusableViewAvailable(ViewRootImpl.java:4061)

解决办法:对UI线程更新要在主线程上面,使用handler进行操作

你可能感兴趣的:(Android)