android / codelab-android-network-security-config

Android Network Security Configuration codelab
https://codelabs.developers.google.com/codelabs/android-network-security-config
Apache License 2.0
78 stars 51 forks source link

Default master branch Network Security application throw "UnknownHostException: Unable to resolve host 'storage.googleapis.com' " when trying to hit the default http endpoint. #15

Closed GeneChuang1 closed 2 years ago

GeneChuang1 commented 2 years ago

Default master branch Network Security application throw "UnknownHostException: Unable to resolve host 'storage.googleapis.com' " when trying to hit the default http endpoint.

GeneChuang1 commented 2 years ago

Sorry, it doesn't work on my Samsung S20 FE phone, but the master branch does work on the Emulator.

GeneChuang1 commented 2 years ago

I think this line of code isn't playing nice with my Samsung Device. GsonRequest gsonRequest = new GsonRequest<>(mUrl, PostList.class, null, new Response.Listener() {

Exception Message is: 2021-12-16 19:58:51.278 31867-31867/com.example.networksecurity E/MainFragment: java.net.UnknownHostException: Unable to resolve host "storage.googleapis.com": No address associated with hostname java.net.UnknownHostException: Unable to resolve host "storage.googleapis.com": No address associated with hostname

GeneChuang1 commented 2 years ago

Samsung A20 phone works with your project.

GeneChuang1 commented 2 years ago

Sorry, it was the VPN on my phone messing things up. Maybe a regional VPN issue. Thanks. No Bug. Close this issue please.