Thread
#serialization
    j

    JCollardBovy

    2 years ago
    Hi everyone! I'm a long standing user of kotlinx.serialisation but since upgrading to 1.0.0-RC I've been facing the following issue in my MPP:
    Overload resolution ambiguity: 
    public fun String.Companion.serializer(): KSerializer<String> defined in kotlinx.serialization.builtins
    public fun String.Companion.serializer(): KSerializer<String> defined in kotlinx.serialization.builtins
    
    Overload resolution ambiguity: 
    public fun <K, V> MapSerializer(keySerializer: KSerializer<TypeVariable(K)>, valueSerializer: KSerializer<TypeVariable(V)>): KSerializer<Map<TypeVariable(K), TypeVariable(V)>> defined in kotlinx.serialization.builtins
    public fun <K, V> MapSerializer(keySerializer: KSerializer<TypeVariable(K)>, valueSerializer: KSerializer<TypeVariable(V)>): KSerializer<Map<TypeVariable(K), TypeVariable(V)>> defined in kotlinx.serialization.builtins
    I've checked the dependencies downloaded by Gradle and indeed see that there are 2 identical artefacts for JVM, but that's not the case for common, JS or native. I only have a single dependency declared on the common module for
    org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.0-RC
    Has anyone experienced something similar and could shed some light on how to solve it?
    m

    Marc Knaup

    2 years ago
    Are both of the duplicates the same version? Maybe a conflicting dependency is imported transitively through some other dependency? Have you tried running a build scan and evaluate the dependency tree? (
    ./gradlew build --scan
    )