Click on Proxy at the top and make sure Use Android Studio Http proxy settings IS CHECKED. Open the Extended controls dialog that opens up to the right of the emulator.
The following steps are for an emulator running Android 11. You have to change the DNS settings within the Emulator. It no longer works to just change the DNS Servers on your local PC.
The problem is the DNS settings on the Emulator.
It seems the previous answers to this problem no longer work in 2021 (Using Android Studio 4.1.2).