I've been struggling with this for a couple of days.
My Android Emulator does not have access to the Internet on Mac OS X when I use my iPhone's tethered Internet connection. I often use this connection whenever working on the go, so it's quite frustrating when it doesn't work.
I've tried the following:
Setting DNS and running emulator from command line.
./emulator -avd Pixel_2_API_26 -dns-server 8.8.8.8
Removing network connections except the tethered connection from Mac OS Networking.
- Deleting and reinstalling the AVD.
Looking at the logs, the only networking related errors I get are:
D/NetworkMonitor/NetworkAgentInfo [WIFI () - 101]: PROBE_FALLBACK http://www.google.com/gen_204 Probably not a portal: exception java.net.UnknownHostException: Unable to resolve host "www.google.com": No address associated with hostname
I/qemu-props: start adbd ...
and
D/NetworkMonitor/NetworkAgentInfo [WIFI () - 101]: PROBE_DNS www.google.com 78245ms FAIL
D/NetworkMonitor/NetworkAgentInfo [WIFI () - 101]: PROBE_HTTPS https://www.google.com/generate_204 Probably not a portal: exception java.net.UnknownHostException: Unable to resolve host "www.google.com": No address associated with hostname
D/ConnectivityService: NetworkAgentInfo [WIFI () - 101] validation failed
D/WifiStateMachine: NETWORK_STATUS_UNWANTED_VALIDATION_FAILED
I feel like the simulator is still trying to use WiFi even though the WiFi device has been removed.
