之前搞了个vpn,并给Android Studio的Http Proxy绑定了一下端口,结果差点被坑哭了。
因为vpn不给力,想着不用代理了,结果跑代码时一直卡在
Gradle: Download maven-metadata.xml in android studio上面,我明明设置了No Proxy了,但是一直就卡着,上网查了一下,都说在.gradle/gradle.properties下。
在项目下确实有个.gradle文件夹,但是下面并没有gradle.properties文件,将改文件夹直接删掉也没用。
我的是mac电脑,于是在用户目录下,在终端 ls -al一下,可以看到真正的.gradle目录,修改一下其中的gradle.properties, 去掉代理信息即可。
电脑用户名/.gradle/gradle.properties
由此可见,项目下的.gradle文件夹应该是实际.gradle的备份。