Я столкнулся с проблемой при настройке экземпляров моего Царства с аннотациями Моши. Подобных проблем не найдено.
Классы моделей ниже
FormField.kt
@JsonClass(generateAdapter = true)
open class FormField(
@Json(name="fieldId")
private var fieldId: String? = null,
@Json(name="fieldName")
private var fieldName: String? = null,
@Json(name="fieldType")
private var fieldType: String? = null,
@Json(name="isRequired")
private var isRequired: Boolean? = null
): RealmObject()
Form.kt @JsonClass (generateAdapter = true) открытый класс Form (
@Json(name="data")
private var formFields: RealmList<FormField>? = null,
@Json(name="name")
private var name: Boolean? = null,
@Json(name="description")
private var description: Boolean? = null,
@Json(name="error")
private var error: Boolean? = null,
@Json(name="message")
private var message: String? = null,
@Json(name="status")
private var status: String? = null
): RealmObject()
И ошибки, которые я получаю
@JsonClass can't be applied to com.example.dynamicforms.data.entity.Form: supertype io.realm.RealmObject is not a Kotlin type
public class Form extends io.realm.RealmObject {
^
@JsonClass can't be applied to com.example.dynamicforms.data.entity.FormField: supertype io.realm.RealmObject is not a Kotlin type
public class FormField extends io.realm.RealmObject {
^
Заранее благодарен за любую помощь :)