The following works for me . File -> Settings -> Appearance & Behavior -> System Settings -> HTTP Proxy Put in your proxy setting in Manual proxy configuration
Restart android studio, a prompt pops up and asks you to add the proxy setting to gradle, click yes.