Threading - Can't create handler inside thread that has not called Looper.prepare()

后端 未结 1 1987
后悔当初
后悔当初 2021-01-26 16:54

I am using some older code and in running this method, I get the Looper.prepare() error. I don\'t understand what the line means but it is very necessary.

Overall progr

相关标签:
1条回答
  • 2021-01-26 17:35

    java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() seems to be a pretty detailed error message; if it errors at that particular line (I'm assuming the handler is being created there) and judging from the stack trace, I would suggest calling Looper.prepare() before the error occurs.

    0 讨论(0)
提交回复
热议问题