Android java.net.UnknownHostException: Host is unresolved

前端 未结 17 1009
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 08:43

This code doesn\'t work:

URL         url   = new URL( xmlPath );
InputSource input = new InputSource( url.openStream() );

all the time, res

17条回答
  •  离开以前
    2020-12-01 09:41

    In my case I was using host name based URL with HttpURLConnection. However, using an IP based url, resolved the issue. I also deleted/recreated the AVD but that didn't help.

提交回复
热议问题