qlite操作时出现下面错误 android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of

sqlite操作时出现下面错误

android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 1

原因:游标初始位置是-1,

解决方案:要用cursor.moveToFirst() or cursor.moveToNext();

猜你喜欢

转载自blog.csdn.net/niuba123456/article/details/48047769