java.lang.IllegalStateException: Couldn't read row 0, col 0 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.
at android.database.CursorWindow.nativeGetLong(Native Method)
at android.database.CursorWindow.getLong(CursorWindow.java:511)
at android.database.AbstractWindowedCursor.getLong(AbstractWindowedCursor.java:78)
at org.greenrobot.greendao.AbstractDao.loadCurrent(AbstractDao.java:541)
at org.greenrobot.greendao.AbstractDao.loadUnique(AbstractDao.java:172)
at org.greenrobot.greendao.AbstractDao.loadUniqueAndCloseCursor(AbstractDao.java:159)
at org.greenrobot.greendao.InternalQueryDaoAccess.loadUniqueAndCloseCursor(InternalQueryDaoAccess.java:41)
at org.greenrobot.greendao.query.Query.unique(Query.java:130)
at com.hj.test.service.TestService.uploadAccessLog(TestService.java:36)
at com.hj.test.service.TestService.onHandleIntent(TestService.java:31)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
有的网友说是字段匹配不上等问题,排查后发现是有一个字段内容超长导致;解决办法,使用更大的字段类型或者修改业务逻辑
仅此记录