e: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
Execution failed for task ‘:app:kaptNormalDebugKotlin’.
Internal compiler error. See log for more details
在项目中的build.gradle中
//dependencies闭包
dependencies {
//原先是3.5.3
classpath 'com.android.tools.build:gradle:4.0.0'
//...
}
调整完,同步一下,之后会出现这样的提示:
这里是引用Minimum supported Gradle version is 6.1.1. Current version is 5.4.1.
Please fix the project’s Gradle settings. Change Gradle version in
Gradle wrapper to 6.1.1 and re-import project Open Gradle wrapper
properties Gradle Settings.
点击确定修改即可。
Gradle sync failed: Minimum supported Gradle version is 6.1.1. Current version is 5.4.1.
Please fix the project’s Gradle settings.
Change Gradle version in Gradle wrapper to 6.1.1 and re-import project
Open Gradle wrapper properties
Gradle Settings. (7 s 339 ms)
在gradle-wrapper.properties中修改配置:
distributionBase=GRADLE_USER_HOME
distributionUrl=https://services.gradle.org/distributions/gradle-6.1.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
//zipStorePath=wrapper/dists
//distributionUrl=https://services.gradle.org/distributions/gradle-5.4.1-all.zip
换掉注释的这两行,更新。
Refer:
This is an unexpected error. Please file a bug containing the idea.log file