I found the answer. its because of the DNS.
I changed the DNS on the emulator.
temporary solution emulator -avd [emulator_name] -dns-server 8.8.8.8
(this will launch your emulator with the provided DNS)
If you want to always launch with the same dns,
Go to C:\Users\<YourUsername>\.android\avd\
Open your emulator_name
folder
Edit the file config.ini
using a text editor
Add the to bottom of the list dns-server=8.8.8.8