实际的报错:
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了
网友评论