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:

  1. in squidman go preferences->general. here enter proxy configuration intermediary proxy. chose 127.0.0.1 host name , port 9090.
  2. go parent , enter corporate/main proxy info.
  3. start squidman
  4. open gradle.properties file in global gradle location(~/.gradle)
  5. 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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -