0

我在执行步骤中收到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.
4

1 回答 1

0

尝试在PC浏览器上打开链接....如果可以,请在设备浏览器上打开链接...希望它能帮助您追踪问题出在代码或服务器的位置

于 2012-10-21T13:20:20.210 回答