Got this error with retrofit2 & OkHttp3. Unable to resolve host “”: No address associated with hostname

前端 未结 4 2045
南笙
南笙 2021-02-12 11:22

I am using the retrofit 2 and OkHttp3 to request data from server. I just added a offline cache code but It\'s not working as expected. I got the error \"Unable to resolve host

4条回答
  •  执念已碎
    2021-02-12 11:37

    This happens when trying to access a hostname that is not available on the connected network. Check whether or not you can access this URL through the web browser of the device. If not: There is your problem.

提交回复
热议问题