Module was compiled with an incompatible version of Kotlin.

现象:The errors indicate that there are modules compiled with different versions of Kotlin than the one expected by the current project.

Specifically, the expected version is 1.1.15, but we have modules compiled with metadata versions 1.7.1, 1.6.0, and 1.5.1.

一、问题:运行spring boot项目时,idea报出错误:时提示报错如下图:

错误代码:

Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.16.

二、产生原因:

这个报错大概意思:模块是用不兼容的Kotlin版本编译的。

原来是idea的kotlin插件版本比pom中的低。

三、解决思路:

把项目里面的版本降一下

一种是升级下idea插件的版本

四、解决办法:

升级Kotlin版本有两种方法步骤如下:

然后清除缓存重启,问题解决;

总结:原因为idea版本旧默认的kotlin版本低,与当前springboot里的ketlin版本冲突导致

相关推荐
云烟成雨TD2 天前
Spring AI Alibaba 1.x 系列【6】ReactAgent 同步执行 & 流式执行
java·人工智能·spring
于慨2 天前
Lambda 表达式、方法引用(Method Reference)语法
java·前端·servlet
swg3213212 天前
Spring Boot 3.X Oauth2 认证服务与资源服务
java·spring boot·后端
gelald2 天前
SpringBoot - 自动配置原理
java·spring boot·后端
殷紫川2 天前
深入理解 AQS:从架构到实现,解锁 Java 并发编程的核心密钥
java
一轮弯弯的明月2 天前
贝尔数求集合划分方案总数
java·笔记·蓝桥杯·学习心得
chenjingming6662 天前
jmeter线程组设置以及串行和并行设置
java·开发语言·jmeter
殷紫川2 天前
深入拆解 Java volatile:从内存屏障到无锁编程的实战指南
java
eddieHoo2 天前
查看 Tomcat 的堆内存参数
java·tomcat
那个失眠的夜2 天前
Mybatis延迟加载策略
xml·java·数据库·maven·mybatis