开发者

Android: not abe to find Looper.quit()

The title explains it all. I have a class that extends AsyncTask. I call it directly in main thread using new classname.execute().

Now in the doInBackground(params) i have Looper.prepare. Since i am getting an error "Only one Looper may be created per thread", i need to use Looper.quit() inside it. But i am not able to find it inside Looper class when i write Lo开发者_JS百科oper.quit();

So how to use this quit function


You have to invoke Looper.myLooper().quit()

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜