Im getting ``` java.lang.IllegalStateException: Ba...
# serialization
j
Im getting
Copy code
java.lang.IllegalStateException: Backend Internal error: Exception during code generation
Cause: Back-end (JVM) Internal error: Serializer for element of type HashMap<String, String> has not been found.
To use context serializer as fallback, explicitly annotate element with @ContextualSerializer
Since the latest serialization_version=0.10.0 Two things, there seems to be no annotation called
@ContextualSerializer
to import, there is a
@ContextualSerialization
however. Using the latter before the HashMap seems to give:
Copy code
No direct method <init>(Lkotlin/reflect/KClass;Lkotlinx/serialization/KSerializer;Lkotlinx/serialization/KSerializer;)V in class Lkotlinx/serialization/ContextSerializer; or its super classes (declaration of 'kotlinx.serialization.ContextSerializer'
Any ideas?
s
Seems like a plugin bug. As a workaround, you can annotate property with
@Serializable(HashMapSerializer::class)
j
@sandwwraith Worked like a charm, thank you