18
Android Room数据库:如何在实体中处理Arraylist?
我刚刚实现了Room来保存离线数据。但是在Entity类中,出现以下错误: Error:(27, 30) error: Cannot figure out how to save this field into database. You can consider adding a type converter for it. 该类如下: @Entity(tableName = "firstPageData") public class MainActivityData { @PrimaryKey private String userId; @ColumnInfo(name = "item1_id") private String itemOneId; @ColumnInfo(name = "item2_id") private String itemTwoId; // THIS IS …