美文网首页
Unable to load class 'javax.xml.

Unable to load class 'javax.xml.

作者: 雨来 | 来源:发表于2022-04-18 15:54 被阅读0次

实际的报错:

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

产生的原因:

我也没有去做太多的分析 ,基本上是 gre和jdk和项目兼容的问题或 你的项目找不到你的本地java 环境

解决办法:

1、找到你的java 环境:
mac终端下 使用如下命令

/usr/libexec/java_home -V
image.png

Android studio 配置上面标红的路径:


image.png

2、配置主module的gradle 支持jdk8


image.png
    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }

Ok 经过以上步骤就ok了

相关文章

网友评论

      本文标题:Unable to load class 'javax.xml.

      本文链接:https://www.haomeiwen.com/subject/koudertx.html