1. 修改 maven 配置
位置:
/Applications/Android Studio.app/Contents/plugins/android/lib/templates/gradle-projects/NewAndroidProject/root/build.gradle.ftl
将里面的 repositories 内容修改:
原内容:
repositories {
<@useProperties/>
google()
jcenter()
<#if includeKotlinEapRepo!false>maven { url '${kotlinEapRepoUrl}' }</#if>
}
修改后:
repositories {
<@useProperties/>
// google()
// jcenter()
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
<#if includeKotlinEapRepo!false>maven { url '${kotlinEapRepoUrl}' }</#if>
}
可根据需要修改成符合自己的内容。
有其他的可以留言后续补充。