Android(安卓)Studio 项目gradle构建 仓库切换国内阿里源。
16lz
2021-01-25
阿里源地址:https://maven.aliyun.com/mvn/view
在项目的build.grable里修改
buildscript { ext.kotlin_version = '1.3.72' repositories { //对应google() maven {url 'https://maven.aliyun.com/repository/google'} //对应jcenter() maven {url 'https://maven.aliyun.com/repository/jcenter'} //公共库 maven {url 'https://maven.aliyun.com/repository/public'} } dependencies { classpath 'com.android.tools.build:gradle:3.6.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}allprojects { repositories { maven {url 'https://maven.aliyun.com/repository/google'} maven {url 'https://maven.aliyun.com/repository/jcenter'} maven {url 'https://maven.aliyun.com/repository/public'} }}
完毕,之后sync now 一下,一下不行,就两下,以此类推。。。
更多相关文章
- 没有一行代码,「2020 新冠肺炎记忆」这个项目却登上了 GitHub 中
- 不吹不黑!GitHub 上帮助人们学习编码的 12 个资源,错过血亏...
- Android开源项目发现--- 工具类依赖注入DI篇(持续更新)
- android Git配置,及分支管理,忽略文件
- android使用keystore打包错误解决方法
- android studio将一个项目作为module(library)导入到另一个项目
- Android(安卓)Studio导入项目又双双踩了几个坑
- Android(安卓)studio项目配置的.gitignore文件
- Android(安卓)Shimmer微光闪烁shimmer-android