Gradle在编译项目的时候,需要下载一些依赖。墙外的网络就需要设置代理了。

设置的方法,见文档:

Accessing the web through a HTTP proxy

systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost


systemProp.https.proxyHost=www.somehost.org
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=userid
systemProp.https.proxyPassword=password
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost

这一段配置,放在gradle.properties文件中。

 

相关文章:

  • 2021-04-09
  • 2021-09-24
  • 2022-12-23
  • 2021-12-29
  • 2021-07-23
  • 2021-07-06
  • 2021-12-16
  • 2021-06-18
猜你喜欢
  • 2021-12-15
  • 2022-12-23
  • 2021-04-04
  • 2021-06-29
  • 2021-03-31
相关资源
相似解决方案