Crash with Kotlin version 1.3.70
See original GitHub issueDescribe the bug
I was able to work well with Kotlin version 1.3.61 but now I am getting crash with Kotlin version 1.3.70
Caused by: java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/String;Lkotlinx/serialization/internal/GeneratedSerializer;I)V in class Lkotlinx/serialization/internal/SerialClassDescImpl; or its super classes (declaration of 'kotlinx.serialization.internal.SerialClassDescImpl' appears in /path)
To Reproduce Create these classes:
@Serializable
data class PolygonResponse(
val maxSpeed: Int?,
val polygons: List<Polygons?>
)
@Serializable
data class Polygons(
val baseCapacity: Int?,
val distanceToPolygon: Int?,
val polygon: List<Polygon?>
)
@Serializable(with = PolygonSerializer::class)
data class Polygon(
val coordinates: List<Double>
)
internal object PolygonSerializer : KSerializer<Polygon> {
private val serializer = ArrayListSerializer(Double.serializer())
override val descriptor: SerialDescriptor = StringDescriptor.withName("Polygon")
override fun serialize(encoder: Encoder, obj: Polygon) {
encoder.encode(serializer, obj.coordinates)
}
override fun deserialize(decoder: Decoder): Polygon {
return Polygon(decoder.decode(serializer))
}
}
Expected behavior Serialization should work properly.
Environment
- Kotlin version: [1.3.70]
- Library version: [0.14.0]
- Kotlin platforms: [JVM]
- Gradle version: [6.2.1]
Issue Analytics
- State:
- Created 4 years ago
- Reactions:32
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Kotlin 1.3.70 Released - The JetBrains Blog
Today we're happy to present to you the latest version of Kotlin – 1.3.70. This incremental release doesn't provide any major new features....
Read more >iOS app crashes on start when using Kotlin/Native framework ...
When trying to start iOS app with included Kotlin/Native framework it is crashing on start with log
Read more >Kotlin version (@kotlin_version) / Twitter
Latest Kotlin version | kotlin.version@gmail.com ... update source documentation for the new default memory manager KT-53667 Compiler crashes on attempt t.
Read more >Kotlin releases
For 1.3.70, we had 2 bug fix releases – 1.3.71 and 1.3.72. ... IntelliJ IDEA and Android Studio suggest updating to a new...
Read more >For loop with Horizontal or Vertical Scroller Crashes ...
Version of Gradle: 6.4. Version of Kotlin: 1.3.70. OS: Arch Linux. Version of Compose: dev-11. Steps to Reproduce: Use the following code in...
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
kotlinx-serialization
depends heavily on the compiler version (on the plugin bundled into compiler, actually), 0.14.0 is not compatible with 1.3.70. We will release 0.20.0 today and think out how to improve diagnostics hereVersion
0.20.0
, which is compatible with1.3.70
, is now published on JCenter and will be available on Maven Central soon. Check out the release notes: https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md#0200--2020-03-04