Gradle can't compile behind proxy -
i'm trying compile android project behind proxy. of dependencies compile fine, when add robolectric build.gradle class path errors. first proxy configuration done in preferences -> http proxy
. when try compile these settings 407 response:
error:could not head 'http://repo1.maven.org/maven2/org/robolectric/robolectric-gradle-plugin/0.12.0/robolectric-gradle-plugin-0.12.0.jar'. received status code 407 server: authorizedonly
which doesn't make sense because provide credentials in http proxy
settings. additionally, try test-url function on http proxy
page , says connection successful.
so try adding settings in gradle.properties file. gives me following 500 error:
error:could not head 'http://repo1.maven.org/maven2/org/robolectric/robolectric-gradle-plugin/0.12.0/robolectric-gradle-plugin-0.12.0.jar'. received status code 500 server: ruleengineerror
are there settings i'm forgetting? why other dependencies mavencentral able compile? freshly imported product didn't begin cache , if take robolectric out compiles fine.
any appreciated. if localized apologize in advance.
to having trouble found solution let's me smoothly download dependencies behind proxy.
i'm trying work behind ntlm proxy me did not cooperate nicely gradle. in order around downloaded squidman , set up. others have suggested in other posts i'm setting intermediary proxy forward requests , enter credentials main proxy.
setup:
- in squidman go preferences->general. here enter proxy configuration intermediary proxy. chose 127.0.0.1 host name , port 9090.
- go parent , enter corporate/main proxy info.
- start squidman
- open gradle.properties file in global gradle location(~/.gradle)
- enter:
systemprop.http.proxyhost=127.0.0.1 systemprop.http.proxyport=9090 systemprop.https.proxyhost=127.0.0.1 systemprop.https.proxyport=9090
gradle should able smoothly download dependencies behind proxy.
hope helps someone!
Comments
Post a Comment