If anyone is still having the same problem, try using this command in your mac terminal.
~/Library/Android/sdk/emulator/emulator -avd <AVD_NAME> -dns-server 8.8.8.8
it basically changes your emulator dns settings as google's dns.