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

前端 未结 3 1995
悲&欢浪女
悲&欢浪女 2020-12-06 14:43

I saw most of the related questions, but I couldn\'t find any that fixed my problem.

This is my code, and I have no idea what I\'m doing wrong.

stati         


        
3条回答
  •  南方客
    南方客 (楼主)
    2020-12-06 15:24

    I recommend using HandlerThread as it prepares the looper for you.

    http://developer.android.com/reference/android/os/HandlerThread.html

提交回复
热议问题