PKIX 路径构建失败
# PKIX 路径构建失败
运行setupDecompWorkspace
任务时,提示BUILD FAILED
构建失败。进一步查看What went wrong
(出了什么问题)下的内容,提示如下内容:
* What went wrong:
A problem occurred configuring root project 'example'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT.
Required by:
:example:unspecified
> Could not resolve net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT.
> Unable to load Maven meta-data from https://files.minecraftforge.net/maven/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/maven-metadata.xml.
> Could not GET 'https://files.minecraftforge.net/maven/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/maven-metadata.xml'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
查看图片
# 解决方案
Java(JRE/JDK)的版本过低,升级Java版本到对应版本的最新版本,安装后可卸载对应版本的旧版本。
JDK 下载:
- Oracle JDK (opens new window):官方的 JDK 下载,下载需登录,商业使用受限
- Adoptium(原AdoptOpenJDK) (opens new window):广为人知的预建 OpenJDK
- Red Hat OpenJDK (opens new window):红帽提供的预建 OpenJDK
- BellSoft Liberica JDK (opens new window):带有 JavaFX 的完整 OpenJDK
编辑此页面 (opens new window)