I have wasted a whole day trying out different solutions floating around in SO and other place mentioned to enable wifi on the android emulator but to no avail. Can anybody
Maybe try using LAN if available. That works as a charm for me...
Well, I did it this way:
Steps to add manual proxy:
Hope it helps.
I have solved with google dns on network adapter 8.8.8.8
and 8.8.4.4
Solution for Windows:
emulator -avd Nexus_4_API_29 -gpu host -dns-server 8.8.8.8
. Here Nexus_4_API_29
will be your emulator device name (You can find it out devices list from Android Studio -> AVD Manager). This command will run your specified device and WIFI will have Internet connected.Hope this helps.
100% Working on Windows 10
Android AVD come with Google DSN configured inside emulators. So we need to set same to network sharing for accessing same.
Google Public DNS IP addresses The Google Public DNS IP addresses (IPv4) are as follows:
8.8.8.8
8.8.4.4
The Google Public DNS IPv6 addresses are as follows:
2001:4860:4860::8888 2001:4860:4860::8844 You can use either address as your primary or secondary DNS server.
More Info
Here I show for setting v4 IP steps
Note : If VPN is enabled then it will not work need to disconnect your VPN
On Windows :
After testing some solutions, I found my one by clicking the down arrow on the AVD, option "Cold Boot Now". after booting, Android had access to internet so it worked for me.