【报错】Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary

Article directory

Error reported:

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

Insert image description here

solution:

Very simple: Build->Rebuild project, then run it and there will be no problem.

Insert image description here

If that doesn't work you can try:

Find Kotlin-related dependencies or configuration items in the project's build file (such as pom.xml) and confirm whether the Kotlin version used in the project is consistent with the Kotlin version in the code base. After modifying it to be consistent, use mvn clean to clean the build cache and rebuild again.

Or you can try:

In IntelliJ IDEA, click “File” -> “Settings” and select “Plugins”. Find the Kotlin plugin and make sure it is the latest version. If it's already the latest version, you can try disabling the plugin first and then enabling it. Just restart IDEA.

Insert image description here

Guess you like

Origin blog.csdn.net/u011397981/article/details/133852626