question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
hawskpycommented, May 20, 2021

直接拷贝 javax.activation-1.2.0.jar 到源码libs 下面 或者把缺失类找到 放到工程里就行

1reaction
EnameChencommented, Jun 5, 2021
implementation 'javax.activation:javax.activation-api:1.2.0'

确实如此

@hawskpy

2FB7SP.png 错误依旧,还是尝试kapt。

AndroidStudio 4.2 可以尝试指定JDK版本为1.8; 我指定了JDK版本后就可以了; File -> Project Structure -> JKD location 1.8.0 的jdk路径

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found