aryono
aryono

Reputation: 121

Android emulator: wifi connected, no internet

It's been a while since I opened android studio. It's all good until today. Today the android emulator can't connect to the internet (tried with chrome browser and my application in the emulator), altough it's wifi is connected. How to fix this?

I already tried:

emulator wifi settings (auto ip / dhcp): Nexus 5S Api 28

Is there a possibility I accidentally uninstall something important / removing network adapter in the 'Control Panel\Network and Internet\Network Connections' ? ( there is only one adapter in there )

Images:

Upvotes: 4

Views: 13932

Answers (2)

Ankit Gupta
Ankit Gupta

Reputation: 672

I was facing the same problem. So while using emulator in outside network it was working and then at my home network, same emulator was showing no internet. The possible cause is due to DNS.

But the solution I opted for this issue is to start emulator, turn off Wi-Fi and turn off data connection of emulator. And then turn on both again and see it will get connected to Internet eventually.

Upvotes: 3

aryono
aryono

Reputation: 121

Just found the solution

your_path_of_android_sdk\tools\emulator -avd -dns-server 8.8.8.8, but failed with message: PANIC: Missing emulator engine program for 'x86'

it does work! but i have to use emulator.exe in the "emulator" folder, not the one in the "tools" folder

the complete command is: F:\AndroidSDK\emulator>emulator -avd Nexus_5X_API_28_x86 -dns-server 8.8.8.8

where Nexus_5X_API_28_x86 is my android emulator name (found in the avd manager in the android studio).

Upvotes: 7

Related Questions