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版本冲突导致

相关推荐
Jelena157795857923 小时前
电商运营分析数据比价接口实战:多平台价格监控与智能决策系统
java·大数据·数据库
神明不懂浪漫4 小时前
【第五章】Java中的继承与多态
java·开发语言
AI多Agent协作实战派6 小时前
AI多Agent协作系统实战(十七):凌晨4点,我的AI系统在“假装工作“——3个bug同时爆炸的5小时
java·前端·bug
gaolei_eit6 小时前
Java+Ai+vue
java·spring·maven
qq_2518364576 小时前
基于java Web 动漫视频网站毕业论文
java·开发语言·前端
LayZhangStrive6 小时前
JUC相关的函数、注解、变量杂记
java·面试·多线程·juc
未秃头的程序猿7 小时前
给公司做了个AI客服Agent,用的Spring AI 1.0,3天上线领导拍板了
java·后端·ai编程
曹牧7 小时前
Eclipse 批量文本替换
java·ide·eclipse
程序员清风7 小时前
OpenAI官方发布最新提示词技巧!
java·后端·面试
一只枫林7 小时前
MySQL内、外连接知识点汇总
java·前端·数据库