android.database.CursorIndexOutOfBoundsException

来源:互联网 发布:win2008r2装sql 编辑:程序博客网 时间:2024/04/29 16:14

android.database.Cursor 在调用 cursor.getString(index); 方法时出现


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


解决办法


cursor.moveToFirst();

然后再去

cursor.getString(index);

0 0
原创粉丝点击