Internet stopped working on Android Emulator (Mac OS)

I am using Android Studio 2.3 (Latest version). Until yesterday everything was fine and worked, today the emulator does not connect to the data network.
I couldn't find any solution working so far. My Mac is running Mac OS Sierra connected to WiFi without a proxy.

enter image description here

+16


source to share


6 answers


In Mac OS go to the link: System Preferences → Network → select Wi-Fi os in the left pane → Advanced in the right pane → DNS → add a new DNS server "8.8.8.8"

DNS setup



He decides for me

+87


source


I think the problem is related to the DNS settings my company is using.

To get network access for my emulator, I needed to run the emulator with the same corporate DNS server specified.

I'm on a Mac, so I first checked my network settings to find that my DNS was set:

System Preferences -> Network -> Wi-Fi -> Advanced -> DNS

      

Then navigate to the location of the SDK emulator (for convenience):

cd ~/Library/Android/sdk/emulator

      



Then the available emulators are listed:

./emulator -list-avds

      

Then I started the desired emulator with overriding the DNS server:

./emulator @<emulator_name> -dns-server <dns.server.ip.address>

      

It would be nice if I could configure this DNS for use by emulators running through Android Studio, but hopefully these steps will help someone else in a similar situation.

+10


source


Couldn't find a solution by configuring network settings. So added a new virtual device from Tools -> Android -> AVD Manager by downloading a new system image (Android O, API 26). And now it works.

If you want to use the same API level, make sure you delete the existing system image and download it again.

+3


source


If you have Blue Coat Unified Agent, the internet won't work. Please remove it.

It can be removed by following the link below folder- / Library / Application Support / bcua

0


source


Providing 8.8.8.8 DNS for WiFi on Mojave (10.14.3) will fix the lack of internet connection on the Android emulator.

0


source


An update was available for my Android Studio, I updated it and it worked!

-1


source







All Articles