[英]Error in android Studio 3.0 when I sync gradle. Error:Cause: unable to find valid certification path to requested target
I got the following Error in android Studio 3.0,when I sync gradle. 同步gradle时,我在android Studio 3.0中收到以下错误。
Gradle 'Projectname' project refresh failed. Gradle'Projectname'项目刷新失败。
Error:Cause: unable to find valid certification path to requested target 错误:原因:无法找到请求目标的有效证书路径
Delete jcenter()
and Change The Repositories in the build.gradle
file to the following format: 删除jcenter()
并将build.gradle
文件中的存储库更改为以下格式:
repositories {
maven {
url "http://jcenter.bintray.com"
}
}
I had faced exact same issue to my existing projects after upgrading Android Studio 3.0. 升级Android Studio 3.0后,我的现有项目也遇到了完全相同的问题。
I was able to resolve it with changing gradle script like below. 我可以通过更改gradle脚本来解决此问题,如下所示。
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:**3.0.0**'
}
}
distributionUrl=https\://services.gradle.org/distributions/**gradle-4.1-all.zip**
I hope this is helpful for you 希望对您有帮助
Note: My Android Studio info 注意:我的Android Studio信息
Android Studio 3.0 Android Studio 3.0
Build #AI-171.4408382, built on October 21, 2017 Build#AI-171.4408382,建于2017年10月21日
JRE: 1.8.0_152-release-915-b01 amd64 JRE:1.8.0_152-release-915-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains sro JVM:JetBrains sro的OpenJDK 64位服务器VM
Windows 7 6.1 Windows 7 6.1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.