在一次代码拉取中,出现了以下问题:Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.15)
详细的报错信息如下:
// 报错信息如下
Could not resolve all files for configuration ':jcore-react-native:lintClassPath'.
> Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.15)
> Could not get resource 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
> Could not GET 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
> Remote host closed connection during handshake
> Could not download trove4j.jar (org.jetbrains.trove4j:trove4j:20160824)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar'.
> Connection reset
不能下载该包名,这种情况在国内很常见,一般出现的情况有:
网络不好(恰好家里的网络不好,也就更容易出现这种情况) 网络被强了(因为你在天朝) 解决办法(用国内的镜像)具体的操作如下:
// google()
// jcenter()
maven { url 'https://maven.aliyun.com/repository/google'}
maven { url 'https://maven.aliyun.com/repository/jcenter'}
maven { url 'http://maven.aliyun.com/nexus/content/groups/public'}
将google、jcenter
的镜像源改为阿里云的,如下图。
附:有时候还不行的话,这时候的你可能需要开热点进行下载了。