Nabi Nabi - 1 month ago 9
Android Question

HttpClient cannot be resolved to a type

i'm trying to make http request in android

but i got these errors

- HttpClient cannot be resolved to a type


- DefaultHttpClient cannot be resolved to a type


screenshot:

enter image description here

Answer

Delete this line:

import org.apache.http.*;

And Add these:

import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
Comments