Android Studio 修改Gradle源
16lz
2021-01-23
Android Studio 修改Gradle源
修改项目的 build.gradle
中的
allprojects{ repositories{ jcenter() }}
为
allprojects{ repositories { def REPOSITORY_URL = 'http://maven.aliyun.com/nexus/content/groups/public/' all { ArtifactRepository repo -> if(repo instanceof MavenArtifactRepository){ def url = repo.url.toString() if (url.startsWith('https://repo1.maven.org/maven2') || url.startsWith('https://jcenter.bintray.com/')) { project.logger.lifecycle "Repository ${repo.url} replaced by $REPOSITORY_URL." remove repo } } } maven { url REPOSITORY_URL } }}
更多相关文章
- eclipse 导出项目到 android studio .so 库
- android rdp 远程桌面项目
- Android开源项目:捕鱼达人游戏源代码
- 整理的一些免费的Android项目实战系列视频教程
- android 项目 访问webservice
- 【Android-Error】导入新项目报错 Error:Could not find bundlet
- [经典]Android开源项目分类汇总和Android 优秀开源项目实现原理