当app/build.gradle中添加
implementation 'io.github.xxx:1.0'时
其
Download https://repo.maven.apache.org/maven2/io/github/xxxxx一直处于慢速下载中,下载一会就中断;
解决方法:使用国内镜像,在主工程build.gradle这个文件加入国内镜像源
在项目的build.gradle中添加:
maven { url "https://repo.maven.apache.org/maven2/io/github/" }//加上这一句
如
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven { url "https://repo.maven.apache.org/maven2/io/github/" }//加上这一句
}
即可解决下载过慢导致失败的问题
文章讲述了在`app/build.gradle`中添加外部依赖`io.github.xxx:1.0`时遇到的下载缓慢和中断问题,提出解决方案是引入国内镜像源,如在`build.gradle`中增加`https://repo.maven.apache.org/maven2/io/github/`作为镜像地址。



1005

被折叠的 条评论
为什么被折叠?



