Android编程知识
Android build error: Unable to load 'javax.xml.bind.jaxbexception
2022-10-14 802 0
简介 Android build error: Unable to load 'javax.xml.bind.jaxbexception
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.
解决办法:
update gradle build tool version in project level gradle
升级gradle到4.2.0以后的版本
dependencies { classpath 'com.android.tools.build:gradle:4.2.0' }
and then Android Studio will download and change your gradle-wrapper.properties
file
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Sync project, everything is OK.