当前位置:   article > 正文

gradle 代理配置_setting.gradel配置端口号

setting.gradel配置端口号

gradle 代理配置

For Chinese users who often use a proxy to download dependency jars, the cause is often proxy settings.
We should check multiple places if the proxy is correctly configured.

  • Android Studio Settings - Appearance & Behavior - System Settings - HTTP Proxy
  • ${project_root}/gradle.properties
  • ~/.gradle/gradle.properties
    In my case, I somehow once configured an HTTP proxy in ~/.gradle/gradle.properties, which was forgotten later. Then when I dealt with a SOCKS5 proxy in IDE Settings and project-level gradle.properties, things always run into trouble. Finally, deleting invalid proxy settings in ~/.gradle/gradle.properties save my day.

示例:

vim ~/.gradle/gradle.properties

#代理配置
systemProp.http.proxyHost=127.0.0.1
#systemProp.http.proxyPort=3128
systemProp.http.proxyPort=1087
systemProp.https.proxyHost=127.0.0.1
#systemProp.https.proxyPort=3128
systemProp.https.proxyPort=1087
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

在公司里使用内网,还要有

vim ~/.bash_profile 

#代理设置
#export http_proxy=http://127.0.0.1:3128
#export https_proxy=http://127.0.0.1:3128
export http_proxy=http://127.0.0.1:1087
export https_proxy=http://127.0.0.1:1087
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

ssr软件的配置要查看端口号,例如ShadowsocksX-NG 的默认为1087

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/856781
推荐阅读
相关标签
  

闽ICP备14008679号