Kotlin: Incompatible classes were found in dependencies. Remove them from the classpath or use ‘-Xskip-metadata-version-check’ to suppress errors
Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
公司的spring项目用到了kotlin,启动项目的时候报了如上错误,说我的kotlin版本过低了,打开plugins,发现Kotlin插件没有更新,遂网上查找解决方案,网上的操作基本都是rebulid project ,我试了还是报错,最后重启ide之后检测到kotlin插件更新了。。我服了。
综上所述,如果报错科特林版本不对 目前发现的能解决的行为有
1.rebulid project
2. 重启ide 检测插件更新(idea这个插件更新是只有重启的时候才会检测一次吗?还是一个bug?我也不知道。。)