AndroidStudio4.2, Unable to load class 'javax.activation.MimeTypeParseException'.
See original GitHub issue环境:
Android Studio 4.2 Gradle 6.8.3
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
...
编译报错: Unable to load class ‘javax.activation.MimeTypeParseException’.
修复: annotationProcessor -> kapt
今天升级AS4.2报该错,由于该模块还没迭代到kotlin,所以还用的是annotationProcessor,后迭代为kapt后错误消失,原因未知。
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top Results From Across the Web
编译不成功,具体配置信息如下· Issue #339 - GitHub
Unable to load class 'javax.activation.MimeTypeParseException'. Possible causes for this unexpected error include: Gradle's dependency cache may ...
Read more >unable to load class 'javax.activation.mimetypeparseexception'.
import javax.activation. MimetypesFileTypeMap; MimetypesFileTypeMap mimetypesFileTypeMap = new MimetypesFileTypeMap(); String.
Read more >This is an unexpected error. Please file a bug containing the ...
Unable to load class 'javax.xml.
Read more >Android Studio报Unable to load class 'javax.xml.bind ... - 简书
过了一个节回来Android Studio项目运行又编译不过了,报如下错误: Unable to load class 'javax.xml.bind.JAXBException'
Read more >How to fix "Unable to load class 'javax.xml.bind ... - YouTube
Solved the error " Unable to load class ' javax.xml.bind.JAXBException'. This is an unexpected error. Please file a bug containing the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

直接拷贝 javax.activation-1.2.0.jar 到源码libs 下面 或者把缺失类找到 放到工程里就行
AndroidStudio 4.2 可以尝试指定JDK版本为1.8; 我指定了JDK版本后就可以了; File -> Project Structure -> JKD location 1.8.0 的jdk路径