有人可以帮我吗?当运行到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