Ambiguous getter for Field… Room persistence library

前端 未结 6 1741
野性不改
野性不改 2021-01-14 00:11

I have the following Entity

public class User {
    @PrimaryKey
    private final long id;

    private String _id;
    private String userName;
    private          


        
6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-14 00:50

    You need to have setter and getter for each private field else you should make them public, another reason that may cause this error is having two getters or setters for a field.

提交回复
热议问题