Gradle can't connect to maven repo through corporate proxy - need to configure through Sencha/Cordova Gradle can't connect to maven repo through corporate proxy - need to configure through Sencha/Cordova android android

Gradle can't connect to maven repo through corporate proxy - need to configure through Sencha/Cordova


You'll need to configure Gradlew to use a proxy server. This is done by creating a gradle.properties file with the following contents:

systemProp.http.proxyHost=www.somehost.orgsystemProp.http.proxyPort=8080systemProp.http.proxyUser=useridsystemProp.http.proxyPassword=passwordsystemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost  systemProp.https.proxyHost=www.somehost.orgsystemProp.https.proxyPort=8080systemProp.https.proxyUser=useridsystemProp.https.proxyPassword=passwordsystemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost

This is an example taken from Chapter 19.3 of the User Guide. Make sure you include both the HTTP and HTTPS values in your file.

You'll place this gradle.properties file in either of these locations:

  1. In your "cordova/platform/android" folder for your mobile project

OR

  1. In your Gradle home folder. For Windows, this is likely %USERPROFILE%\.gradle\ (Ex: C:\Users\username\.gradle\).

I would recommend putting it in Gradle home so that other projects pick it up and you don't have to worry about putting it under source control.

You can also find more info in this post.


I had the same error, but it was after i installed git which in turn changed my environment variables. I went back there to remove the added path and it worked