Android Error java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

2017. 9. 25. 16:59Mobile/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

반응형