Unable to build an ionic app behind a corporate proxy


I am building an application using the ionic framework on a windows 7 virtual machine running on a RHEL host. I am trying to build the application using the command: ionic build android but the build fails with the following error:
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

Could not resolve all dependencies for configuration ‘:classpath’.
Could not resolve com.android.tools.build:gradle:1.0.0+.
Required by:
Failed to list versions for com.android.tools.build:gradle.
Unable to load Maven meta-data from https://repo1.maven.org/maven2/co
Could not GET ‘https://repo1.maven.org/maven2/com/android/tools/bu
The target server failed to respond

I’ve configured the gradle.properties files under C:\Users<user>\gradle.properties file. This is how it looks

The build process throws the error in addition to the one I mentioned above.
build.gradle -Dorg.gradle.daemon=true
Invalid value for java system property ‘http.proxyPort’: 8080 . Default port
’80’ will be used.
Invalid value for java system property ‘http.proxyPort’: 8080 . Default port
’80’ will be used.

although, I googled extensively, the solutions posted were mostly to configure the gradle.properties file but it does not seem to take effect. Therefore, it would be very helpful if someone could help me to resolve this error. Thanks for your time!



Do you have whitespace at the end of systemProp.http.proxyPort=8080?

1 Like

Hi Sterling,

Thank you very much for your reply. You are right, I had a trailing whitespace and I removed it from the gradle.properties file. But today, I was able to build the app even though I am not using the gradle.properties file (I renamed the file to gradlebk.properties). Not sure why. I’ll have to dig deeper. Thanks once again.



Hi, I have the same issue, did you grok the thing? :slight_smile: