简体   繁体   English

Android Studio 无代理

[英]Android Studio with No Proxy

My System has No Proxy Server我的系统没有代理服务器

在此处输入图像描述

So I updated my proxy settings as No Proxy所以我将代理设置更新为无代理

在此处输入图像描述

Also I have commented out proxy settings in my gradle.propertiesgradle.properties中注释掉了代理设置

#systemProp.http.proxyHost=127.0.0.1
#systemProp.http.proxyPort=8080
#systemProp.https.proxyHost=127.0.0.1
#systemProp.https.proxyPort=8080

Still I'm getting我仍然得到

Gradle sync failed: Connection timed out: connect. Gradle 同步失败:连接超时:连接。 If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.如果您使用 HTTP 代理,请在 IDE 或 Gradle 中配置代理设置。

For any future people with issues like that.对于任何有类似问题的未来人。

TL;DR TL;博士

  1. remove proxy settings from android studio.从 android 工作室中删除代理设置。
  2. remove proxy settings from your android project gradle.properties file从 android 项目 gradle.properties 文件中删除代理设置
  3. remove proxy settings from your PC/MAC gradle system files, located at your USER/your OS working directory/gradle/gradle.properties file.从位于您的用户/您的操作系统工作目录/gradle/gradle.properties 文件中的 PC/MAC gradle 系统文件中删除代理设置。

What happened?发生了什么?

Because of insert_reason you turn on proxy(global proxy for all connections) for android studio, gradle took those proxy settings and installed them as default connection so removing proxy from android studio or reinstalling is not enough, gradle.properties will force proxy settings from gradle.properties outside of your android studio. Because of insert_reason you turn on proxy(global proxy for all connections) for android studio, gradle took those proxy settings and installed them as default connection so removing proxy from android studio or reinstalling is not enough, gradle.properties will force proxy settings from gradle android 工作室之外的 .properties。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM