Room Persistence: Error:Entities and Pojos must have a usable public constructor

前端 未结 24 1807
长发绾君心
长发绾君心 2020-12-01 09:05

I\'m converting a project to Kotlin and I\'m trying to make my model (which is also my entity) a data class I intend to use Moshi to convert the JSON responses from the API<

24条回答
  •  猫巷女王i
    2020-12-01 09:29

    Just add the below annotation to any constructor that causes the errors and add a new blank constructor.

    @Ignore

提交回复
热议问题