记一次 :新安装的 Android Studio 3.2.1, 编译时报错
Unknown host 'd29vzk4ow07wi7.cloudfront.net'. You may need to adjust the proxy settings in Gradle.
解决方法1、
设置->更改适配器选项->右键单击你正在使用的网络设备->属性->双击 Internet协议版本4(TCP/IPv4)->选择 使用下面的DNS服务器地址->设置上114.114.114.114 然后确定就好了
解决方法2、
修改项目根目录下的 build.gradle
在 google() 下添加阿里云的镜像 maven{ url'http://maven.aliyun.com/nexus/content/groups/public/'}
buildscript { repositories { google() maven{ url'http://maven.aliyun.com/nexus/content/groups/public/'} jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() maven{ url'http://maven.aliyun.com/nexus/content/groups/public/'} jcenter() } }