Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kotlinx.serialization.SerializationException: Serializer for class 'Traits' is not found. #813

Open
danielgomes96 opened this issue Aug 29, 2022 · 1 comment

Comments

@danielgomes96
Copy link

Hi guys, I'm using "com.segment.analytics.android:analytics:4.10.4" in my current project and wherever I do:

val traits = Traits()

in the project, I get the following error:

 kotlinx.serialization.SerializationException: Serializer for class 'Traits' is not found.
    Mark the class as @Serializable or provide the serializer explicitly.
@wenxi-zeng
Copy link
Contributor

wenxi-zeng commented Aug 29, 2022

need more context here. what's the usage of the traits? are you serializing it with the kotlinx seralization sdk? because the sdk itself is not using that library.

since you're using this library in kotlin, it's recommended to upgrade to our analytics-kotlin. it's idiomatic in kotlin, and takes the advantage of coroutines. see performance benchmark here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants