-
1.打开 Project->settings.gradle.kts
-
2.按照下图添加阿里源
maven { url = uri("https://maven.aliyun.com/repository/public/") }
maven { url = uri("https://maven.aliyun.com/repository/google/") }
maven { url = uri("https://maven.aliyun.com/repository/jcenter/") }
maven { url = uri("https://maven.aliyun.com/repository/central/") }
这是新版的(2022.3.1)
maven {url 'https://maven.aliyun.com/repository/public/'}
maven {url 'https://maven.aliyun.com/repository/google/'}
maven {url 'https://maven.aliyun.com/repository/jcenter/'}
maven {url 'https://maven.aliyun.com/repository/central/'}
这是旧版本的