Strange error executing httpclient

I created an http request in my project. I sat, but did not work, therefore, to simplify this part in order to check this: This is it:

HttpClient cl = new DefaultHttpClient(); try { HttpResponse httpResponse = cl.execute(new HttpGet("http://www.google.com")); System.out.println(httpResponse.getEntity().getContentLength()); } catch (Exception e) { System.out.println("didn't work!"); System.out.println(e.getMessage()); } 

But when I run it, I get the following:

 07-21 15:57:36.203 26851-26851/com.akgradev.upbman W/οΉ• Unable to open '/system/framework/qcom.fmradio.jar': No such file or directory 07-21 15:57:36.203 26851-26851/com.akgradev.upbman W/artοΉ• Failed to open zip archive '/system/framework/qcom.fmradio.jar': I/O Error 

And of course, "Doesn't work!" and "null" for prints! I appreciate your Tnx tips.

+7
java android
source share
1 answer

Do you know that HttpClient deprecated?

https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client

Your exceptions may be the result of the API being no longer supported.

0
source

All Articles