org/jetbrains/kotlin/annotation/plugin/ide/AnnotationBasedPluginModelBuilderService

本文解决了一个在AndroidStudio中遇到的问题,当尝试使用Kotlin插件时出现NoClassDefFoundError错误。解决方法包括关闭IDE,清除.gradle下的缓存文件夹,然后重新启动AndroidStudio。

问题:
Caused by: java.lang.NoClassDefFoundError: org/jetbrains/kotlin/annotation/plugin/ide/AnnotationBasedPluginModelBuilderService
Caused by: java.lang.ClassNotFoundException: org.jetbrains.kotlin.annotation.plugin.ide.AnnotationBasedPluginModelBuilderService
在这里插入图片描述
解决:
关闭Android studio ,删除.gradle下的caches,重新启动AS。
在这里插入图片描述

安卓报错Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors e: C:/Users/admin/.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation/1.5.0/857678d6b4ca7b28571ef7935c668bdb57e15027/annotation-1.5.0.jar!/META-INF/annotation.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.4.0. e: C:/Users/admin/.gradle/caches/transforms-3/1c9d568c81ffb6bda370dd48f7d8e5cf/transformed/jetified-kotlin-stdlib-common-1.8.0.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.4.0. e: C:/Users/admin/.gradle/caches/transforms-3/e3f72d5f03d122aa0777551263e19f4b/transformed/jetified-kotlin-stdlib-1.8.0.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.4.0. e: C:/Users/admin/.gradle/caches/transforms-3/e3f72d5f03d122aa0777551263e19f4b/transformed/jetified-kotlin-stdlib-1.8.0.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.4.0. e: C:/Users/admin/.gradle/caches/transforms-3/e3f72d5f03d122aa0777551263e19f4b/transformed/jetified-kotlin-stdlib-1.8.0.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.4.0.
03-29
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值