Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gradle behind proxy in Android Studio 1.3

I've just upgraded Android Studio to version built on 28 July 2015. And proxy settings stopped working.

I have them configured in AS preferences and in project's gradle.properties like this:

systemProp.http.proxyHost=some.proxy.adress.com
systemProp.http.proxyPort=3128

And yet gradle build fails suggesting I should configure the proxy in either graddle properties or IDE.

Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.

What else can I try?

P.S. Proxy works and is picked-up properly from Android Studio preferences, as git works as expected.

like image 913
ssuukk Avatar asked Aug 04 '15 07:08

ssuukk


People also ask

How do I change my proxy settings in gradle?

Go To: File --> Setting --> Build, Execution, Deployment --> Gradle, then tick the use local Gradle distribution, then set Gradle home by giving path to Gradle. Tick offline work. Show activity on this post. If you are using an http proxy server, revise the following proxy settings in "gradle.

Where is proxy setting in android studio?

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.

How do I sync gradle with android studio?

Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.


1 Answers

Perhaps you also need to configure the https settings

systemProp.https.proxyHost=www.somehost.org
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=userid
systemProp.https.proxyPassword=password
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost
like image 104
lance-java Avatar answered Oct 05 '22 23:10

lance-java