现在已经到了我不能再忍受的地步了!我见过很多人遇到过与此问题相同的问题,但他们的解决方案对我不起作用。
我正在尝试从Android应用程序调用REST服务。我还是Android BTW的新手。 调用代码如下所示:
String httpResult = "";
HttpClient httpClient = new DefaulthttpClient();
HttpContext httpContext = new BasicHttpContext();
String url = myURL;
HttpGet httpGet = new HttpGet(myURL);
HttpResponse response = httpClient.execute(httpGet, httpContext);
//receive response in input stream
InputStream is = response.getEntity().getContent();
//convert the stream into a string
if(is != null){
//call method that will convert stream to string
httpResult = cString(is);
}else{
httpResult = "Error";
}
当我调试代码时,我看到当编译器点击"HttpClient httpClient = new DefaultHttpClient()"
代码行并显示"No Source Found"
屏幕时会引发异常。
答案 0 :(得分:1)
调试时应该使用F6来跳过。