Sometimes, the Android emulator does not connect to internet, this might happen if there is a custom DNS server on the network.
This has become a classical emulator issue, but there is no simple way to quickly fix it other than using the emulator’s UI to set static local IP address along with a new DNS inside the network settings.
A quick fix is to run the emulator with a custom DNS using command line. This might not be the best long-term fix, but it might come handy in some situations.
# Get a list of android emulators on your device emulator -list-avds # Run an emulator with DNS set to 220.127.116.11 (Google) emulator -avd Pixel_2_API_30 -dns-server 18.104.22.168
This will open the emulator with DNS already set to “22.214.171.124”.