Android emulator not able to access the internet

John Moore picture John Moore · Mar 11, 2017 · Viewed 219.3k times · Source

I know that similar questions have been asked before, but my problem is new only after installing Android Studio 2.3, the latest version in March 2017. I have several years experience developing Android applications, and I have never encountered this problem before. After upgrading to version 2.3 of Android Studio, my emulator is no longer able to access the internet. I even uninstalled/reinstalled Android Studio 2.3 from scratch and created a new emulator, and I am still getting the same error. This is not an app problem. I can't even access the internet from Chrome, and I wasn't having this problem last week. The message that I get says that the server DNS address could not be found -- DNS_PROBE_FINISHED_BAD_CONFIG. The only thing that has changed on my computer in the last week is the new version of Android plus possibly updates to Windows 10. And yes, my computer has access to the internet. Below is an image of my emulator when I try to use Chrome to search for "Google". emulator with error message

Answer

Ana Paula picture Ana Paula · Mar 17, 2018

Change the DNS address of your network to 8.8.8.8 (Google's DNS) or another of your preference:

MacOSX:
  • Open "System Preferences"
  • Click on "Network"
  • Select the network which your computer is connected and click on "Advanced"
  • Select "DNS", Select the "+" button, type "8.8.8.8" (Google's DNS) or if you prefer OpenDNS, "208.67.222.222"
  • Select "Ok" and "Apply"

Windows & Linux:

https://developers.google.com/speed/public-dns/docs/using


After that close the emulator and start it again.