解决Error:Kotlin:Module was compiled with an incompatible version of Kotlin.The binary 。。。报错

问题记录

1、问题

今天在启动项目时idea 报错Error:Kotlin:Module was compiled with an incompatible version of Kotlin.The binary version of its metadata is 1.5.1,expected version is 1.1.16.

解决Error:Kotlin:Module was compiled with an incompatible version of Kotlin.The binary 。。。报错

 2、问题解决方法

方案一:升级kotlin插件(不建议)

方法二:IDEA 打开设置: flie -> settings -> plugins 找到 kotlin 插件,把 kotlin 插件 disable,然后restart IDEA。

解决Error:Kotlin:Module was compiled with an incompatible version of Kotlin.The binary 。。。报错

方法三:compile项目

解决Error:Kotlin:Module was compiled with an incompatible version of Kotlin.The binary 。。。报错

 方法四:Rebuild Project

解决Error:Kotlin:Module was compiled with an incompatible version of Kotlin.The binary 。。。报错

总结:

  • 第一种升级了插件,但是问题没有解决(不推荐)
  • 第二种方案:可以解决问题(推荐)
  • 第三种方案:第一次compile成功了,但是后面再次出现后compile就不生效了(不推荐)
  • 第四种方案:可以解决问题(推荐)

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/f18cc3d2fb.html