NetworkOnMainThreadException with AsyncTask
问题 I need to do some HTTP requests from my android app. I use AsyncTask as needed, with the network part in doInBackground. Here is my request class : public class AsyncRequest extends AsyncTask<Void, Integer, HttpResponse>{ private ProgressDialog dialog; private Activity activity; private HttpUriRequest query; private HttpClient client; private HttpResponse response; private String dialogMsg; private String uri; public String getUri() { return uri; } public void setUri(String uri) { this.uri =