相关疑难解决方法(0)

在Android Studio中设置Http代理

我已经阅读了多个类似的问题和文档,但无法解决我的机器被企业防火墙所困扰的问题。我收到的错误是“无法刷新Gradle项目”未知主机services.gradle.org。我阅读并理解的所有内容都使我相信这是一个http代理问题。我尝试在Project文件夹的gradle.properties文件中设置代理属性,因此gradle.properties文件如下所示:

# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -    Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating …
Run Code Online (Sandbox Code Playgroud)

proxy android android-studio

5
推荐指数
1
解决办法
4万
查看次数

标签 统计

android ×1

android-studio ×1

proxy ×1