Developer Discussions

Ask a Question
Back to All

Encountered the Kotlin Serialization crash while using the v2.0.1 in Android DSL

// Kotlin Base Setup Project
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1")

While using the kotlin serialization version 1.8.10, I have to exclude the Kotlin serialization from maya SDK provded on github due the conflict of duplicacy.

//Pay Maya
implementation ("com.github.paymaya:paymaya-android-sdk-v2:v2.1.0"){
    exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-serialization-runtime")

}

When I excluded the serialization the error occurs while intstantiating the sdk .

java.lang.InstantiationError: kotlinx.serialization.json.Json
                                                                                                	at com.paymaya.sdk.android.common.internal.di.CommonModule.getJson

I would also recommend maya to create a stable git repo for compose platform, since Compose is now a part of Default android configurations. Passing the activity as context and using the startCheckoutActivityForResult is not a optimum feasible solution.