为了账号安全,请及时绑定邮箱和手机立即绑定

无法构建应用程序获取错误::找不到类型 jdk 的工具链

无法构建应用程序获取错误::找不到类型 jdk 的工具链

猛跑小猪 2021-10-28 09:53:59
我为此尝试了不同的解决方案,但对我不起作用,请查看错误日志和toolchain.xml文件。这些是错误日志:[INFO] --- maven-toolchains-plugin:1.1:toolchain (default) @ ad-api ---[INFO] Required toolchain: jdk [ vendor='sun' version='1.8' ][ERROR] No toolchain found for type jdk[ERROR] Cannot find matching toolchain definitions for the following toolchain types:jdk [ vendor='sun' version='1.8' ][INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 0.619 s[INFO] Finished at: 2018-10-05T08:56:24+02:00[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal org.apache.maven.plugins:maven-toolchains-plugin:1.1:toolchain (default) on project ad-api: Cannot find matching toolchain definitions for the following toolchain types:[ERROR] jdk [ vendor='sun' version='1.8' ][ERROR] Please make sure you define the required toolchains in your ~/.m2/toolchains.xml file.[ERROR] -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException当我将版本 1.8 更新到 jdk1.8._172 时出现上述错误
查看完整描述

1 回答

?
有只小跳蛙

TA贡献1824条经验 获得超8个赞

将 pom 中的版本改为 1.8 而不是 jdk1.8.0_172


                <configuration>

                    <toolchains>

                        <jdk>

                            <version>1.8</version>

                            <vendor>sun</vendor>

                        </jdk>

                    </toolchains>

                </configuration>


查看完整回答
反对 回复 2021-10-28
  • 1 回答
  • 0 关注
  • 1034 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信