java.net.UnknownHostException Unable to resolve host “accounts.google.com”: No address associated with hostname while inserting rows in bigquery

两盒软妹~` 提交于 2019-11-30 06:50:31

This Exception Thrown to indicate that the IP address of a host could not be determined.

This exception is also raised when you are connected to a valid wifi but router does not receive the internet. Its very easy to reproduce this:

Connect to a valid wifi Now remove the cable from the router while router is pluged-in

You will observe this error!!

You can't really solve this, You can only notify the user gracefully. (something like - "Unable to make a connection")

also make sure you have added the permission in AndroidManifest.xml.

<uses-permission android:name="android.permission.INTERNET" />

Have you added the INTERNET permission to your manifest file.

If not, add below line outside the application tag in your AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" /> 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!