Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 393
Laser Avatar asked Aug 26 '13 11:08

Laser


People also ask

How do you fix you may need to adjust the proxy settings in gradle?

On your android studio goto file -- settings -- Build, Execution, Deployment --Build Tools -- Gradle and choose Use local gradle distribution, in the gradle home locate your gradle folder and click apply. Then click okay. This solved the problem for me.

Where is proxy setting in Android Studio?

Set up the Android Studio proxy To set the HTTP proxy settings in Android Studio: From the menu bar, click File > Settings (on macOS, click Android Studio > Preferences). In the left pane, click Appearance & Behavior > System Settings > HTTP Proxy. The HTTP Proxy page appears.


1 Answers

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 
like image 180
Sumit Sahoo Avatar answered Oct 02 '22 21:10

Sumit Sahoo