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

相关推荐
96771 天前
理解IOC控制反转和spring容器,@Autowired的参数的作用
java·sql·spring
SY_FC1 天前
实现一个父组件引入了子组件,跳转到其他页面,其他页面返回回来重新加载子组件函数
java·前端·javascript
耀耀_很无聊1 天前
09_Jenkins安装JDK环境
java·运维·jenkins
ノBye~1 天前
Centos7.6 Docker安装redis(带密码 + 持久化)
java·redis·docker
黑臂麒麟1 天前
openYuanrong:多语言运行时独立部署以库集成简化 Serverless 架构 & 拓扑感知调度:提升函数运行时性能
java·架构·serverless·openyuanrong
XiaoLeisj1 天前
Android Jetpack 页面架构实战:从 LiveData、ViewModel 到 DataBinding 的生命周期管理与数据绑定
android·java·架构·android jetpack·livedata·viewmodel·databinding
⑩-1 天前
为什么要用消息队列?使用场景?
java·rabbitmq
似水明俊德1 天前
01-C#.Net-泛型-面试题
java·开发语言·面试·c#·.net
Allnadyy1 天前
【C++项目】从零实现高并发内存池(一):核心原理与设计思路
java·开发语言·jvm
浑水摸鱼仙君1 天前
SpringSecurity和Flux同时使用报未认证问题
java·ai·flux·springsecurity·springai