Received close_notify during handshake

最近新买了一台HP工作站,为了验证性能,一开始就下载了Android Studio,然后从远程仓库pull代码。果不其然,报错了:

Received close_notify during handshake

翻译一下:

>握手期间收到close_notify

是不是跟我一样一脸懵逼!AS为最新版本,确实只提示了这个ERROR,崩溃!思来想去,将AS换成3.0.1版本,编译后报错如下:

Error:A problem occurred configuring root project '###'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not download lint-checks.jar (com.android.tools.lint:lint-checks:25.2.2)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint-checks/25.2.2/lint-checks-25.2.2.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint-checks/25.2.2/lint-checks-25.2.2.jar'.
            > Received close_notify during handshake

是不是很惊喜,这两个版本的AS其实报的是同一个错误,但是低版本的反而描述了具体问题所在,所以有时候东西不一定就是最新的好。

问题原因分析:因为伟大的Wall,所以jcenter()有些资源无法获取到,更改成国内镜像吧!

找到项目中的build.gradle,将所有jcenter()替换成:

maven { url 'https://maven.aliyun.com/repository/jcenter' }

 

你可能感兴趣的:(Android基础)