Q:

AndroidStudio gradle proxy

I've tried to run AndroidStudio
But It's failing on boot with gradle error:  
Failed to import Gradle project: Connection timed out: connect
I found solution here
But I can't find how to set this properties in Android Studio.
Setting them in graddle-wrapper.properties doesn't help.

A:

Go to gradle.properties file (project root directory) and add these options.
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=user
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=localhost
systemProp.http.auth.ntlm.domain=domain

systemProp.https.proxyHost=www.somehost.org
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=user
systemProp.https.proxyPassword=password
systemProp.https.nonProxyHosts=localhost
systemProp.https.auth.ntlm.domain=domain

A:

In Android Studio -> Preferences -> Gradle, pass the proxy details as VM options.
Gradle VM Options
-Dhttp.proxyHost=www.somehost.org -Dhttp.proxyPort=8080 etc.
*In 0.8.6 Beta Gradle is under File->Settings (Ctrl+Alt+S, on Windows and Linux)

A:

For Android Studio 3.2(Windows),you can edit the gradle.properties file under C:/Users/USERNAME/.gradle for current user.
Reference Image

