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

后端 未结 2 800
刺人心
刺人心 2020-12-30 05:51

Hi I am working on android app in which I have integrated BigQuery. I see we are getting a lot of exception sometimes while inserting records in BigQuery tables. We are not

相关标签:
2条回答
  • 2020-12-30 06:23

    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" />
    
    0 讨论(0)
  • 2020-12-30 06:40

    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" /> 
    
    0 讨论(0)
提交回复
热议问题