使用CursorTreeAdapter绑定游标cursor后
异常:
java.lang.IllegalStateException: Couldn't read row 0, col 1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.
方法:
百度后发现了很多类似的异常,Couldn't read row 0, col -1 from CursorWindow
注意不同的是,此处为-1
搜到的很多说是查询的时候列名写错了,与数据库中的列名不一致(多一空格或少一空格)
仔细检查后,发现查询的语句并没有错
将手机的数据库.db文件导出,用软件工具打开,输入sql语句,也能正常查询
起初以为是CursorTreeAdapter使用错了
折腾了半天,最后发现数据库中存在一条超大数据,一个html的文本,包含多个图片字节流。
导致在使用CursorTreeAdapter绑定后,获取数据列时抛出异常