开发者

not able to make a call to POST from async task [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

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

I am getting the following exception on making a call to a method, which eventual开发者_Go百科ly makes a POST method call from my async task:

"Cant Create Handler Inside Thread That Has Not Called Looper Prepare in Android" .

I am using async task to show progress dialog.

Can you please help me.

Thanks


Duplicate of Can't create handler inside thread that has not called Looper.prepare() inside AsyncTask for ProgressDialog

In short: the progress dialog's show() method must be called from the UI thread, not from the background thread. Use onProgressUpdate or onPreExecute for that.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜