Android:httpCLient.execute中的UnKnownHostException

时间:2012-10-21 13:07:29

标签: android httpclient unknown-host

我在执行步骤中收到 UnknownhostException

httppost = new HttpPost("http://www.xxxx.com/contoller/method");
httpResponse response = client.execute(httppost);

java.net.UnknownHostException "www.xxxx.com"

在某些地方,我需要删除 http://

然后我得到了这个例外

java.lang.IllegalStateException: Target host must not be null, or set in parameters.

1 个答案:

答案 0 :(得分:0)

尝试在PC浏览器上打开链接....如果有效则打开设备浏览器上的链接...希望它能帮助您跟踪问题代码或服务器的位置