This has now come to a point where I cannot take it anymore! i have seen a lot of people have had the same problem as this one but their solution do not work for me.
I am trying to call a REST service from my Android application. I am still new to Android BTW. The calling code looks like this:
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";
}
When I debug the code, I see that throws an exception when the compiler hits the "HttpClient httpClient = new DefaultHttpClient()" line of code and shows "No Source Found" screen.