英文:
Android Studio build error: Can't load a class
问题
我甚至没有对应用程序进行任何操作,它就出现了以下错误:
Caused by: java.lang.NoClassDefFoundError: org/jetbrains/kotlin/annotation/plugin/ide/AnnotationBasedPluginModelBuilderService
我使用Java和API 21配置了这个项目,操作系统是Windows。
我尝试过的方法:
- 删除 .gradle 文件夹
- 删除整个项目
- 将构建所使用的 jre 更改为我在计算机上安装的 JDK,即 JDK14
然而都没有起作用。非常感谢任何提供帮助的信息!
编辑:尝试了另一种方法:禁用然后重新启用 Kotlin 插件,但仍然不起作用。感谢用户 @Android_id 提出的可能性!
英文:
I didn't even do anything to the app and it gave the following error:
Caused by: java.lang.NoClassDefFoundError: org/jetbrains/kotlin/annotation/plugin/ide/AnnotationBasedPluginModelBuilderService
I configured this project with Java and API 21, and is on Windows OS
What I've tried:
- Deleting .gradle
- Deleting the entire project
- Changing the jre used for build to the jdk I installed on my computer, which is JDK14
Aand it doesn't work. Any help appreciated!
EDIT : One more thing attempted: disabled then enabled the Kotlin plugin, still does not work. Thanks user @Android_id for suggesting the possibility though!
专注分享java语言的经验与见解,让所有开发者获益!
评论