Quick Tip: Fix Android Emulator DNS Issues in Arch/Linux
Tulio Calil

Tulio Calil @tuliocalil

About: 🚀 Software Eng | React, React Native, Elixir, and Node.js Enthusiast | Tech Writer | Transforming Complex Concepts into Simple Code | Constantly Learning 📚

Location:
Bahia, Brasil
Joined:
Nov 25, 2020

Quick Tip: Fix Android Emulator DNS Issues in Arch/Linux

Publish Date: Oct 14
2 0

If your Android emulator can't resolve domains or loses internet connection, try this:

# Open this file:
code ~/.android/avd/<your_avd_name>.avd/user-settings.ini
# or
code ~/.config/.android/avd/<your_avd_name>.avd/user-settings.ini

# Add this line:
commandLineOptions=-dns-server 8.8.8.8
Enter fullscreen mode Exit fullscreen mode

Then restart the emulator (preferably with a cold boot).

This forces the AVD to use Google’s DNS, works like a charm when local DNS is messy.

Originally found this tip on Stack Overflow while troubleshooting DNS issues in the Android emulator.

Comments 0 total

    Add comment