0
내 웹 페이지에서 json을 검색하려고합니다.연결을 설정할 수 없습니다. 웹 페이지에서 json을 검색하십시오.
하지만 json을 검색 할 수 없습니다. 그것은 null입니다. 그래서, 내 오류를 찾고 있었고, 참조
HttpClient client = new DefaultHttpClient();
//Create the request with a get method
HttpGet get = new HttpGet(ProjectRestDao.url);
//specify that we want to retrieve a json
get.setHeader("Accept", "application/json");
//Run the request //Error here.
HttpResponse response = client.execute(get);
IOException e.
무엇이 문제입니까?
logcat 오류를 넣으십시오. – dipali
'IOException'을 캐치하고'e.printMessage();'를 실행 한 다음 우리에게 보여주십시오. –