Last Updated: January 20, 2022
·
157.8K
· rock3r

Fix Internet connection in Android Emulator

If you're using an Android Emulator and it can't connect to the internet (even the browser won't work), it's likely that it's screwed up picking the wrong Network Adapter from the host system. The Emulator gets DNS setting from a host Network Adapter, so picking the wrong one might leave it with the wrong settings and render it unable to connect.

You now have two ways to fix the issue.

The first one is disabling all the Network Interfaces that aren't connected to the Internet. This is the easiest, but often less viable solution, as you'll likely need to keep those up (for example they might be VM virtual network interfaces, or else).

The second one is specifying a parameter to the Emulator, explicilty setting the DNS. Assuming you want to use Google's public DNS, you'll have to set -dns-server 8.8.8.8 in the run configuration settings.

4 Responses
Add your response

41288176

over 1 year ago ·

awesome. I love it.

over 1 year ago ·

Thanks a lot man.. Saved me from connecting to VPN everytime I needed internet in emulator

over 1 year ago ·

I totally have no idea what you just said. I got to the 20-dns.conf screen in my koplayer app. do i edit in this screen? I feel like im so close. Just need to fix this network adapter and im golden. Please help.

over 1 year ago ·
  NODES
Community 1
Idea 1
idea 1
Intern 8
iOS 2
Javascript 4
mac 9
os 14
server 1
twitter 1