在导入一些安卓app项目的时候,可能会报Connection timed out: connect,导致的原因之一如下:
在build.gradle文件中,发现里面的仓库是使用maven的,有时候因为其他原因导致Connection timed out: connect repositories { maven { url "http://maven.oa.com/nexus/content/groups/androidbuild" } }
allprojects { repositories { maven { url "http://maven.oa.com/nexus/content/groups/androidbuild" } }
现在将上面的两个部分修改为下面的就行了
repositories { google() jcenter() }
allprojects { repositories { google() jcenter() }
问题就这样解决了,希望对大家有所帮助!