public void getXml(){
  String urlAddr = "http://www.google.com/";
 
  try{
   HttpGet get = new HttpGet(URLEncoder.encode(urlAddr,"utf-8"));
   
   DefaultHttpClient client = new DefaultHttpClient();
   String html = "";
   HttpResponse res = client.execute(get);
   
   

  }catch (Exception e) {
   // TODO: handle exception
   Log.i("ERROR",e.getMessage());
  }

 


간단하게 구글사이트에 요청해서 결과받아보는 그런거 만들었는데요..

 

자꾸 이런에러가 나네요

 

target host must not be null or set in parameters. scheme=null host=null

 

구글에서 검색해봐도 URL에 http://가 빠져서 그런걸꺼니까 http://를 붙이면해결될거라고하는데

 

저는 안빠트리고 잘 썼거든요 ㅠㅠ...이거 왜이러는걸까요