Ambiguous getter for Field… Room persistence library

前端 未结 6 1751
野性不改
野性不改 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 01:04

    Me also face the same issue. While I remove the

    "_" underscore symbol, from "_id"

    then works fine.

    public class User {
        @PrimaryKey
        private final long id;
    
        private String myid;
        private String userName;
        private String email;
    }
    

    It works for me and I hope it work for others. Thank You.

提交回复
热议问题