Why am I getting this error? ```kotlinx.serializat...
# serialization
n
Why am I getting this error?
Copy code
kotlinx.serialization.SerializationException: Serializer for class 'Pagination' is not found.
My data class:
Copy code
import kotlinx.serialization.Serializable

@Serializable
data class Pagination<T>(
    val count: Int,
    val next: String? = null,
    val previous: String? = null,
    val results: List<T>
)
Build.gradle:
Copy code
plugins {
    id("com.android.application")
    kotlin("android")
    id("kotlin-android-extensions")
    kotlin("plugin.serialization") version Versions.kotlin
}
This used to work… but then i ran into a bug with AS and moved my
repository
into my main module. When I did that, I ran into this issue.
After a build and clean, I am now getting the following:
Copy code
Caused by: java.lang.AssertionError: Couldn't load KotlinClass from [...]/app/build/tmp/kotlin-classes/debug/com/starwars/browser/repository/model/Pagination.class; it may happen because class doesn't have valid Kotlin annotations