有人可以幫我嗎?當運行到HttpResponse響應= client.execute(請求); ,I get catch(IOException e),它顯示「沒有路由到主機」。android發帖,爲什麼我收到「沒有路由到主機」
HttpClient client = new DefaultHttpClient();
HttpPost request = new HttpPost(urlstr.toString());
List postParams = new ArrayList();
postParams.add(new BasicNameValuePair(「Login_User_Name」,namestr));
postParams.add(new BasicNameValuePair(「Login_User_Password」,passwordstr));
UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(postParams,HTTP.UTF_8);
request.setEntity(formEntity);
HttpResponse response = client.execute(request);
我的網站soucecode低於
或者我該如何連接使用url? http://192.168.8.100/protocol.csp?fname=security&opt=pwdchk&name=???&pwd1=???&function=set – fangzheng
Android系統是否在同一網絡上運行? 192.168。#。#保留給私人地址。更多信息@ http://en.wikipedia.org/wiki/Private_network#Private_IPv4_address_spaces – Farray