Android Error java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
2017. 9. 25. 16:59ㆍMobile/Android
반응형
Android Error java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
기존:
Handler mHandler = new Handler();
해결:
Handler mHandler = new Handler(Looper.getMainLooper());
참고:
https://stackoverflow.com/questions/6369287/accessing-ui-thread-handler-from-a-service
반응형
'Mobile > Android' 카테고리의 다른 글
갤럭시 S10 5G 크라운 실버 개봉기 (1) | 2019.07.15 |
---|---|
갤럭시 노트9 개봉기 오션블루+512GB (1) | 2018.08.17 |
Android stetho (크롬 디버깅) (0) | 2017.08.27 |
Android DataBinding 사용 (0) | 2017.08.08 |
Android JSON using GSON 쉽게 변환 (0) | 2017.07.14 |