Skip to content Skip to sidebar Skip to footer

Androidhttpclient.execute Is Returning Httpresponse As Null

I am trying to access my uri from the below code AsyncTask asyncTask = new AsyncTask() { @Override protected Object doInBackground(Object... params) {

Solution 1:

In AVD to connect to localhost you need to use url

       http://10.0.2.2/

instead of

        http://localhost/

For reference.

Solution 2:

To access localhost in emulator use 10.0.2.2

http://localhost:8080/restsql-0.8.6/res/

should be

http://10.0.2.2:8080/restsql-0.8.6/res/

Check the docs

Post a Comment for "Androidhttpclient.execute Is Returning Httpresponse As Null"