首页 > 技术文章 > 踩坑纪:Unable to load class 'javax.xml.bind.JAXBException'

popfisher 2021-07-21 10:18 原文

AS 编译异常 Unable to load class 'javax.xml.bind.JAXBException'.

问题描述

升级AS 4.2 之后,编译不通过,出现如下异常

Unable to load class 'javax.xml.bind.JAXBException'.
This is an unexpected error. Please file a bug containing the idea.log file.

解决办法(mac上)

修改JDK路径为的1.8版本,如果没有安装过,请先安装

1. 查看mac上已经安装的JDK路径

打开终端,输入如下命令:

/usr/libexec/java_home -V

注意:输入命令参数区分大小写(-v是不对的,必须是-V)

2. 在AS中修改路径


推荐阅读