在 Android Studio 3.2.1 中禁用代理设置不起作用 [英] Disabling proxy settings in Android Studio 3.2.1 not working
问题描述
有时我在内部网络中工作并且必须在 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;
- 删除了
gradle.properties/local.properties
中的http
和https
配置. - 在
Preferences->中禁用代理配置;系统设置->HTTP 代理
. - 删除了网络中的操作系统代理设置.
- 卸载 &安装 Java
- 卸载 &安装 SDK
- 卸载 &安装 Android Studio
- Removed
http
andhttps
configuration ingradle.properties / local.properties
. - Disabled proxy configuration in
Preferences-> System Settings-> HTTP Proxy
. - Removed operating system proxy settings in network.
- Uninstall & install Java
- Uninstall & install SDK
- 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.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..
这篇关于在 Android Studio 3.2.1 中禁用代理设置不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!