unable to find valid certification path to requested target
idea导入gradle工程报错
A problem occurred configuring root project 'yzf'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.ow2.asm:asm:7.0-beta.
Required by:
project : > com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:5.0.0 > com.github.jengelman.gradle.plugins:shadow:5.0.0
> Could not resolve org.ow2.asm:asm:7.0-beta.
> Could not get resource 'https://plugins.gradle.org/m2/org/ow2/asm/asm/7.0-beta/asm-7.0-beta.pom'.
> Could not HEAD 'https://jcenter.bintray.com/org/ow2/asm/asm/7.0-beta/asm-7.0-beta.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
乍一看是请求缺少证书,对着JDK就是一顿加入证书操作,一度以为是自己装了假的JDK
后来在stackoverflow上看到某位大佬说是build.gradle文件中maven的配置url要使用双引号,一看自己项目里的url真的是单引号的
改成双引号重新问题解决,奇怪的是同事用同样的配置都能正确使用,遂记录下