libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
Posted 乐之者
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)相关的知识,希望对你有一定的参考价值。
log报错如下:
Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
Caused by: libcore.io.ErrnoException: getaddrinfo failed: EACCES (Permission denied)
原因及解决方法:
主要是没有在androidManifest里面添加网络访问权限。
<uses-permission android:name="android.permission.INTERNET"/>
以上是关于libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)的主要内容,如果未能解决你的问题,请参考以下文章