访问不了Connect to dl.google.com:443 [dl.google.com

1、IP查询:https://tool.lu/ip/

image.png

2、Mac上的、etc/hosts中添加
120.253.255.161 dl.google.com

3、安卓项目下的build.gradle中的改为阿里云的仓库地址:
参考地址:https://developer.aliyun.com/mvn/guide

buildscript {
    repositories {
// 添加阿里云 maven 地址
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
        maven { url 'https://maven.aliyun.com/repository/central/' }
        maven { url 'https://maven.aliyun.com/repository/public/' }
        maven { url 'https://maven.aliyun.com/repository/google/' }
        google()
        jcenter()
    }
}
 
allprojects {
    repositories {
// 添加阿里云 maven 地址
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
        maven { url 'https://maven.aliyun.com/repository/central/' }
        maven { url 'https://maven.aliyun.com/repository/public/' }
        maven { url 'https://maven.aliyun.com/repository/google/' }
        google()
        jcenter()
    }
}


你可能感兴趣的:(访问不了Connect to dl.google.com:443 [dl.google.com)