0
做的isNull时我已经在我的Android应用程序中的DAO计算策略,数据库对象转换为Java对象有类似的东西:删除logcat的CursorWindow错误在Android
public void populateObjectWithCursor(Cursor cursor) {
if(!cursor.isNull(cursor.getColumnIndex(Const.USER_ID)))
this.id = cursor.getLong(cursor.getColumnIndex(Const.USER_ID));
}
但是当参考isNull无法访问列,它示出了在logcat的错误:
E/CursorWindow:无法由具有1行,2列的CursorWindow 读行0,列-1。
我想骑上这个,你知道它是否可能吗?没有发现任何异常处理呢?
谢谢
感谢您的回应,像我之前编辑的文章一样会解决我的问题。 – Bibu
您的第二种方法解决了错误吗?如果是这样,请从问题中删除答案。 –
对于下一个感兴趣的人(感谢@Osama):public void populateObjectWithCursor(Cursor cursor){ \t \t int rowNumber = cursor.getColumnCount(); \t \t对(INT I = 0;我
Bibu