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
A simple cold boot worked for me, no need to start other emulators or wiping memory.
Just close your emulator and select the "Cold Boot Now" option on the drop menu adjacent to the play button. If not look for any of the more comprehensive options listed here, but I suggest always starting with the simplest solution.
Good luck!