Android java.net.UnknownHostException: Host is unresolved

前端 未结 17 1021
被撕碎了的回忆
被撕碎了的回忆 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:48

    My problem was when sharing the internet from the computer via WIFI, after ethernet connection was lost and reconnected I couldn't achieve connection on the phone. This was fixed by restarting internet sharing on computer.

    Hope it helps someone.

提交回复
热议问题