peer not authenticated error

问题背景

系统:OS X El Capitan,10.11.2

IDE:Android Studio 2.0 Preview

Java:1.8.0_65

Gradle:2.3

clone了代码后,在ide中sync代码,无法完成,报错“peer not authenticated”。

解决方案(暂时)

  1. 将所有build.gradle中出现的jcenter()改为http形式的链接
    jcenter {
        url "http://jcenter.bintray.com"
    }
  2. 将所有build.gradle中出现的mavenCentral()改为同上的链接
  3. (可选)在console中使用 ./gradlew :app:assembleStandardRelease 进行build
    ./gradlew :app:assembleStandardRelease 

备注

  1. 根本原因待分析,jcenter()、mavenCentral() 这样的写法,在其他同事电脑上是没问题的……
  2. 使用命令行而不是ide进行build,可以看到更详细的log
原文地址:https://www.cnblogs.com/maozhige/p/5049454.html