我在我的项目中创建了一个http请求.我坐着它但是没有那么简单的部分来测试它:这就是它:
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());
}
Run Code Online (Sandbox Code Playgroud)
但是当我运行它时我会得到这些:
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
Run Code Online (Sandbox Code Playgroud)
当然是"没有用!" 印刷品的"空"!我感谢你的提示Tnx