当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/" }//加上这一句 }
即可解决下载过慢导致失败的问题