IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.
来源:互联网 发布:python可以开发软件吗 编辑:程序博客网 时间:2024/04/29 14:29
java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.
IllegalState:非法状态。在调用cursor查询数据库是出现此错误。返回的值是-1,说明没找到这个字段。
首先查询:
if (cursor.moveToFirst()) { do { // your content } while (cursor.moveToNext());}
把上面的代码改为下面的:
while (cursor.moveToNext()) { // your content}
Like this.
如果还不行,就可能是数据库的问题。检查一下数据库。 0 0
- IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.
- Android SQLite 数据库 java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow异常
- java.lang.IllegalStateException: Couldn't read row 0, col 1 from CursorWindow.异常
- java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow异常
- Android示例java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.
- va.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor
- 已解决—java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.
- java.lang.IllegalStateException: Couldn't read row 0, col 0 from CursorWindow
- java.lang.IllegalStateException: Couldn't read row 0, col 6 from CursorWindow异常
- 读取系统通讯录信息的时候出错:.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow
- Android中操作Sqlite遇到的错误:java.lang.IllegalStateException: Couldn't read row 1, col 0 from CursorWindow
- java.lang.IllegalStateException: Couldn't read row 2, col 4 from CursorWindow.
- 数据库Log之Couldn't read row 0, col -1 from CursorWindow
- Couldn't read row 0, col -1 from CursorWindow, Cursor initialization error
- ExpandableListView异常Couldn't read row 0, col -1 from CursorWindow
- Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before
- Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before
- Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before
- 【C#】在VS2012中连接MSSQL数据库
- Android 高德地图定位功能的实现步骤
- PHP面向对象编程(二)
- Java生成CRC16数据校验码
- Android 同步机制
- IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.
- 常见设计模式
- 极光的研究
- SQL注入攻击高级
- 在VIM中进行文本替换:
- Gradle直接下载失败连接超时问题
- 【杂文随笔】2016年总结 送自己一个字
- YOLO源码详解(四)- 反向传播(back propagation)
- xml。。。json。。。object之间转化