问题描述
首次打开别人的安卓项目,Gradle下载一些文件时报错Time out,无法下载某些库。
解决方法
在工程中Gradle文件夹下的build.gradle文件中做如下修改:
将下列代码块写在jcenter()之前,确保先访问maven()里面的连接。
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public/'
}
参考:安卓 android studio 报错 Unknown host ‘jcenter.bintray.com’. You may need to adjust the proxy settings in Gradle.