集成GreenDao,inserty一個Entity會出現greendao unique constraint failed錯誤.
1.首先entity中需要存在一個Long類型的主鍵(@Id(autoincrement = true) private long id;)
2.在entity的構造方法中置id = null.
集成GreenDao,inserty一個Entity會出現greendao unique constraint failed錯誤.
1.首先entity中需要存在一個Long類型的主鍵(@Id(autoincrement = true) private long id;)
2.在entity的構造方法中置id = null.