I am trying to convert a JsonArray of Strings using Seriazable (inside the Model class) but the app keeps crashing

AppComponent.java:11: error: [ComponentProcessor:MiscError] dagger.internal.codegen.ComponentProcessor was unable to process this interface because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.

This is an item from the list (retrofit). My problem comes when i try to parse the colours array

        "id": 12,
        "title": "Event",
        "start_date": 1557219638,
        "end_date": 1557222342,
        "workshop": {
            "id": 13,
            "title": "Event",
            "appearance": {
                "id": 1,
                "name": "Teal",
                "type": "Gradient",
                "colours": [

and the model classes

@Entity(tableName = "Event")
data class Event(

    var id: Int,

    var title : String,

    var startDate : Int,

    var endDate : Int,
    var workshop: Workshop

) :Serializable {}

@Entity(tableName = "Workshop")
data class Workshop(

    var idW: Int,

    var titleW : String

    var appearance: Appearance
) : Serializable {

@Entity(tableName = "Appearance")
data class Appearance(

    var id :Int,
    var name : String,

    var type :String,

    @ColumnInfo(name = "colours") //here is the problem
    var colours: List<String>

) :Serializable {

   constructor(): this(0,"","","", listOf(),0)

I don't know how to parse the colours[] in this point. Should I use another model class?

0 Answers