在我的项目中创建了一个HTTP请求,但是它没有起作用,所以我简化了那一部分进行测试。以下是简化后的代码:
当然,还有一些打印输出内容,如“没用!”和“null”!感谢您的提示。谢谢。
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());
}
但是当我运行它时,我会得到以下的结果:
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
当然,还有一些打印输出内容,如“没用!”和“null”!感谢您的提示。谢谢。