Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning "Kotlin plugin version is not the same as library version" (but it is!)

Starting from Kotlin 1.4 dependency on the standard library added by default:

You no longer need to declare a dependency on the stdlib library in any Kotlin Gradle project, including a multiplatform one. The dependency is added by default.

The automatically added standard library will be the same version of the Kotlin Gradle plugin, since they have the same versioning.

For platform-specific source sets, the corresponding platform-specific variant of the library is used, while a common standard library is added to the rest. The Kotlin Gradle plugin will select the appropriate JVM standard library depending on the kotlinOptions.jvmTarget compiler option of your Gradle build script.

Link to Kotlin Gradle plugin documentation.


This is a bug in the Kotlin plugin. I've filed an issue in the Kotlin issue tracker. You can simply ignore the message.

EDIT: JetBrains marked the issue as a duplicate of KT-23744 "Kotlin library and Gradle plugin versions are different" inspection false positive for non-JVM dependencies".


You might be facing this after upgrading kotlin version, Actually, older versions are still in your caches, In this case, you need to do the following steps

  1. Invalidate cache
  2. Clean project
  3. Sync project with gradle files

Now your warning will be gone.