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"/> 

 

文章来自:http://www.cnblogs.com/expiator/p/6018723.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3