将您的存储库语法更改为以下之一
repositories { jcenter { url "http://jcenter.bintray.com/" }}repositories { maven { url "http://repo1.maven.org/maven2" }}当前(2.1)gradle文档声称
Warning: Be aware that the central Maven 2 repository is HTTP only and HTTPS is not supported. If you need a public HTTPS enabled central repository, you can use the JCenter public repository (see Section 51.6.3, “Maven JCenter repository”).
我认为Maven Central可以使用https。如果我使用以下语法。
repositories { mavenCentral()}我收到以下错误。
D: tools gradle-2.1-bin bin gradle.bat -q
失败:生成失败,发生异常。
出了什么问题:配置根项目“ XXXX”时出现问题。
无法解析配置’:classpath’的所有依赖关系。无法解析de.undercouch:gradle-download-task:1.0。:XXXX:所要求的不确定莫非不是HEAD ‘ https://repo1.maven.org/maven2/de/undercouch/gradle-download-task/1.0/gradle-download-task-1.0.pom ‘。对等方未认证
- 尝试:使用–stacktrace选项运行以获取堆栈跟踪。使用–info或–debug选项运行以获取更多日志输出。



