wzgiceman / RxjavaRetrofitDemo-master

Retrofit+Rxjava+okhttp终极封装(Gson方案)
http://blog.csdn.net/column/details/13297.html
MIT License
1.06k stars 290 forks source link

Greendao problems #19

Open LiPingStruggle opened 7 years ago

LiPingStruggle commented 7 years ago

Thanks for sharing the author found a problem when I tried it, and find the reasonAnd you said hereGreendao database problem into the first data no problem to insert the second report abnormal dataAndroid. Database. Sqlite. SQLiteConstraintException: PRIMARY KEY must be unique (code 19) see this exception I think is a problem of the PRIMARY KEY.And when I tried it is not, so I found type is not corresponding to check the source code.So he changed the CookieResulte id type from long to Long after see the source is a non-empty judgment judge normal should set id for self growth

thanks

wzgiceman commented 7 years ago

Yes, someone has similar problem. But there was no this problem, I test the demo preliminary doubt is cheap GreenDao automatically generated class problems, modify the CookieResulte long to Long can solve this problem, I has been updated making source code to fix the problem ,Thx