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
For me this helped:
On Mac OSX (Catalina for me), the problem is caused by the fact that the emulator automatically picks up the nameserver by looking at /etc/resolv.conf and picking the first one, in my case, an IPv6 address. Source
Simply edit the file ($ sudo vi /etc/resolv.conf) and move the IPv4 address (192.168.1.1 in my case) to be first, before the IPv6 addresses.
Seriously, that was it. From Demetrios Christopher