在 Android Studio 3.2.1 中禁用代理设置不起作用 [英] Disabling proxy settings in Android Studio 3.2.1 not working

查看:39
本文介绍了在 Android Studio 3.2.1 中禁用代理设置不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时我在内部网络中工作并且必须在 Android Studio 中设置 proxy settings 现在我已经更改了网络并需要禁用 proxy settings能够下载依赖项.

Sometimes I am working in internal network and have to setup proxy settings in Android Studio now I have changed the network and need to disable proxy settings to be able to download dependencies.

但不知何故我无法禁用代理配置.Android Studio 仍在尝试通过代理连接.这是我禁用它的方法;

But somehow I can't disable proxy configuration. Android Studio is still trying to connect through proxy. Here is what I did to disable it;

  1. 删除了 gradle.properties/local.properties 中的 httphttps 配置.
  2. Preferences->中禁用代理配置;系统设置->HTTP 代理.
  3. 删除了网络中的操作系统代理设置.
  4. 卸载 &安装 Java
  5. 卸载 &安装 SDK
  6. 卸载 &安装 Android Studio
  1. Removed http and https configuration in gradle.properties / local.properties.
  2. Disabled proxy configuration in Preferences-> System Settings-> HTTP Proxy.
  3. Removed operating system proxy settings in network.
  4. Uninstall & install Java
  5. Uninstall & install SDK
  6. Uninstall & install Android Studio

不幸的是,上述步骤和社区中的答案都没有奏效.感觉好绝望:)

Unfortunately none of above steps and the answers in community worked. Feeling so desperate :)

这是 Android Studio 的屏幕截图.我的最终选择是格式化 macOS.

Here is the screenshot of Android Studio. My final choice will be formatting macOS.

推荐答案

我认为您有代理设置的全局属性.您可以从此处查看全局 gradle 属性.

I think you have global properties for proxy settings. You can check the global gradle properties from here.

我们可以定义一个 gradle.properties 文件并在这个文件中设置属性文件.我们可以将文件放在我们的项目目录或/.gradle 目录.属性中定义的属性我们主目录中的文件优先于定义的属性在我们项目目录的文件中.作为奖励,我们还可以定义gradle.properties 文件中的系统属性,我们只需添加前缀带有 systemProp 的属性名..

We can define a gradle.properties file and set the property in this file. We can place the file in our project directory or in the <USER_HOME>/.gradle directory. The properties defined in the property file in our home directory take precedence over the properties defined in the file in our project directory. As a bonus we can also define system properties in a gradle.properties file, we only have to prefix the property name with systemProp..

全局 gradle 代理设置?

这篇关于在 Android Studio 3.2.1 中禁用代理设置不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆