GreenDao3 常见问题汇总

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010782846/article/details/79899489

1.UNIQUE constraint failed: DEVICE_FIND_CONFIG_HELPER._id (code 1555)class android.database.sqlite.SQLiteConstraintException:code:  runtime

解决办法:

  首先entity中需要存在一个Long类型的主键(@Id(autoincrement = true) private long id;)

  在entity的构造方法中置id = null.


2.   Caused by: java.lang.IllegalArgumentException: the bind value at index 1 is null

查询的字段为null  查询不能传入null


猜你喜欢

转载自blog.csdn.net/u010782846/article/details/79899489