Android Studio报Unable to load class 'javax.xml.bind.JAXBException'

过了一个节回来Android Studio项目运行又编译不过了,报如下错误:
Unable to load class 'javax.xml.bind.JAXBException'
This is an unexpected error. Please file a bug containing the idea.log file

解决方法:
修改项目下的build.gradle版本号,将gradle版本升级到4.x.x

dependencies {
        classpath 'com.android.tools.build:gradle:4.2.1'
        
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

你可能感兴趣的:(Android Studio报Unable to load class 'javax.xml.bind.JAXBException')