简体   繁体   English

为Gradle问题设置HTTPS代理服务器

[英]Set HTTPS proxy server for Gradle problem

I want to set HTTPS proxy in Android Studio for Gradle.我想在 Gradle 的 Android Studio 中设置 HTTPS 代理。 There is no standard options for set it via dialog box (HTTP or SOCK only), but according this guide I set it via gradle.properties file in my project.没有通过对话框设置它的标准选项(仅限 HTTP 或 SOCK),但根据指南,我通过项目中的gradle.properties文件设置它。

systemProp.https.proxyHost = 8.8.8.8 // just for example
systemProp.https.proxyPort = 8080

I found a free proxy server and checked it via web browser, but it is not work for Android Studio.我找到了一个免费的代理服务器,并通过 web 浏览器进行了检查,但它不适用于 Android Studio。 Any hints?有什么提示吗?

Here is an answer of mine describing how to configure proxy over Gradle.这是我的一个答案,描述了如何通过 Gradle 配置代理。

To make sure that the properties you have set is active, You can use the command line at the project directory (where gradle.properties is located) and type gradle properties , This should list all the active gradle properties at the current location.要确保您设置的属性处于活动状态,您可以在项目目录( gradle.properties所在的位置)中使用命令行并键入gradle properties ,这应该列出当前位置的所有活动 Z8ED1A771BC236C287ZAD93C69BFDD2 属性

You can also add to gradle home where it is usually located at C:/Users/%USERNAME%/.gradle , This way you will have a global setup, so you don't have to add the proxy to all gradle.properties You can also add to gradle home where it is usually located at C:/Users/%USERNAME%/.gradle , This way you will have a global setup, so you don't have to add the proxy to all gradle.properties

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

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