Platform: I’m using Ionic 2 beta 35 on windows 10 with Java 1.8.0_102 and Android Studio 2.1.3 is installed.
SITUATION
I’m working on a site with a proxy and when I run ‘ionic build android’ I’m getting the following error:
Exception in thread "main"
java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
Now, I can see that I need to tell java/gradle to use the proxy. I’ve tried to specify this everywhere I can, but it seems to be ignored or overwritten (e.g. when in the platforms/android/*). I’ve created a gradle.properties file in platforms/android/gradle/ and also tried editing the existing gradle-wrapper properties, but they are ignored or over-written respsectively.
I’ve also tried telling java to use these settings directly, by specifying the Dhttp.proxyhost=[host] etc. I’ve tried this in the CLI and also in the gradlew.bat file (but the latter gets overwritten).
QUESTION:
Does anyone know where the correct place to set proxy settings is?
I’m afraid not! I couldn’t find any information on it and didn’t have any suggestions that worked for me. I was allowed non-proxied access in the end, so stopped looking into it. Sorry, but I hope you get it sorted