Networking code sometimes throws UnknownHostException

前端 未结 4 858
迷失自我
迷失自我 2020-11-29 13:30

I am trying to data from a server. Sometimes my code fails due to an UnknownHostException. Why is that? What is the cause of this problem?

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-29 13:50

    An UnknownHostException indicates the host specified couldn't be translated to an IP address. It could very well be a problem with your DNS server.

提交回复
热议问题