"kotlinx.serialization core version is too low" cumbersome message when previous version is present in transitive dependencies
See original GitHub issueWe have a lot of reports in slack with Your current kotlinx.serialization core version is too low, while current Kotlin compiler plugin 1.4.0 requires at least 1.0-M1-SNAPSHOT. Please update your kotlinx.serialization runtime dependency
error message even though there is a direct dependency in the Gradle [1].
The root of the problem – the previous version is present in the transitive dependencies.
The proper solution would be to detect this transitivity and indicate it in the error message
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Build Error in kotlinx-serialization w/ Retrofit 2
Your current kotlinx.serialization core version is too low, while current Kotlin compiler plugin 1.4.21 requires at least 1.0-M1-SNAPSHOT.
Read more >Spring Boot Reference Documentation
Instructions for how to upgrade from earlier versions of Spring Boot are provided on the project wiki. Follow the links in the release...
Read more >InvalidFragmentVersionForActivit...
I'm sorry for the previous message, the issue was caused by the dependency configuration of our project (some modules had a transitive dependency...
Read more >Serialization: New player has joined
With the release of Kotlin 1.4 we got a new treat; kotlinx.serialization. A new tool to help us with the cumbersome task of...
Read more >System requirements for 200.0 | ArcGIS Maps SDK for Kotlin
ArcGIS Maps SDK for Kotlin transitive dependencies ; kotlinx-coroutines-core, 1.6.0, runtime ; kotlinx-coroutines-android, 1.6.0, runtime ; kotlinx-serialization- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anyone stumbling across this, in my case I resolved this by replacing
with
in
build.gradle
.Can someone illuminate me on what the difference is? If this is just a renaming, can we trigger some sort of IDE warning about this?
I get a similar error in the plugin for IntelliJ IDEA that depends on
IntelliJ Platform SDK
for version2021.3
, but not for2021.2.x
. Error message is:Your current kotlinx.serialization core version is too low, while current Kotlin compiler plugin 1.6.0 requires at least 1.0-M1-SNAPSHOT. Please update your kotlinx.serialization runtime dependency.
error.Could be reproduced using recommended IntelliJ plugin template (https://github.com/JetBrains/intellij-platform-plugin-template)
My minimal intellij plugin test case: kotlinx_issue.tar.gz
If you change
platformVersion
ingradle.properties
to2021.2.3
- everyting is ok, but with2021.3
compilation error.The plugin uses kotlinx serialization library
1.3.1
and kotlin1.6.0
I assume this is caused by the difference dependencies that come from IntelliJ Platform SDK:
Update: In my case several kotlinx libraries were repackaged in
IntellliJ Platfrom SDK, 2021.3
, butMETA-INF/MANIFEST.MF
file is missing, so the compiler fails to detect what kotlinx implementation api is used (stored as a property manifest file, e.g.Implementation-Version: 1.1.0
). In future sdk versions this will be fixed.As a temporary workaround: Disable the error message from compiler using
@Suppress("PROVIDED_RUNTIME_TOO_LOW")
before every@Serializable
, e.g.: