timer1 [오류] android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. 해결 법 최근 개발 중 timer를 사용하다가 아래와 같은 오류를 발견했다. android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. timer(period = 3000, initialDelay = 3000) { with(binding) { if (count >= 3) { count = 0 } else { ++count } textExTitle.text = exTitleList[count] textExContent.text = exContentList[count] } } 위 코드를 보면 timer 스코프 안에서 textView의 te.. 2022. 12. 18. 이전 1 다음