Android中操作Sqlite遇到的错误:java.lang.IllegalStateException: Couldn't read row 1, col 0 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.

常见的错误原因解决:

错误1:请求的字段在数据库的表中不存在,一般是大小写没写对。

错误2:编程的中途改变表的字段,实际字段并没有改变,解决方法是卸载当前版本,再安装调试。

错误3:查询语句中并没有查询该字段,使用的时候却要得到该字段的值。

下边还有一种不常见的错误,查了好多资料都没有查到,很少人遇到一样,记录下来希望可以帮到别人:

错误4:如果字段中有Blob类型的,存储的文件最好不要超过1MB,超过1MB就容易出现上述错误。

解决办法就是要么压缩,要么分批读取出来,(韩国朋友的代码,个人没有测试,仅供大家参考思路:)

java.lang.IllegalStateException: Couldn't read row 1, col 0 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data fr的更多相关文章

  1. java.lang.IllegalStateException:Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.

    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx...}: java.lang.IllegalSta ...

  2. 【异常】Caused by: java.lang.IllegalStateException: RequestParam.value() was empty on parameter 0

    使用@RequestParam注解,必须指定名称如: @RequestParam("date")String date

  3. 【我的Android进阶之旅】解决sqlcipher库:java.lang.IllegalStateException: get field slot from row 0 col 0 failed.

    一.背景 最近维护公司的大数据SDK,在大数据SDK里面加入了ANR的监控功能,并将ANR的相关信息通过大数据埋点的方式记录到了数据库中,然后大数据上报的时候上报到大数据平台,这样就可以实现ANR性能 ...

  4. myeclipse 无法启动 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).

    把myeclipse10 按照目录完整拷贝到了另外一台电脑, 另外的目录 原安装目录 D\:\soft\i\myeclipse10 新安装目录 E\:\soft\myeclipse10 双击启动失败, ...

  5. java.lang.IllegalStateException: Not allowed to create transaction on shared EntityManager - use Spring transactions or EJB CMT instead

    java.lang.IllegalStateException: Not allowed to create transaction on sharedEntityManager - use Spri ...

  6. java.lang.IllegalStateException: getOutputStream() has already been called for this response

    ERROR [Engine] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exceptionjava.lang ...

  7. 用java实现文件下载,提示java.lang.IllegalStateException: getOutputStream() has already been called for this response

    1. 用java实现文件下载,提示java.lang.IllegalStateException: getOutputStream() has already been called for this ...

  8. eclipse启动报错java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' befo

    报错: java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invo ...

  9. java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

    在ViewPager中,用Fragment显示页面时,报错: java.lang.IllegalStateException: The specified child already has a pa ...

随机推荐

  1. Index was outside the bounds of the array. (Microsoft.SqlServer.Smo)

    本地ssms是 安装Sqlserver 2008 r2 自带的 远端的server是sqlserver2014 可以连接,可以执行查询语句.但是,不能使用ssms生成对象的脚本.推测ssms 2008 ...

  2. sersync

    一.准备 1.目标:从192.168.0.1上把/app/web/cnblogs.com/data下文件同步到192.168.0.2下的/app/web/cnblogs-slave.com/data: ...

  3. email

    #region 邮件帮助类 //+-------------------------------------------------------------------+ //+ FileName: ...

  4. HBase工程师线上工作经验总结----HBase常见问题及分析

    阅读本文可以带着下面问题:1.HBase遇到问题,可以从几方面解决问题?2.HBase个别请求为什么很慢?你认为是什么原因?3.客户端读写请求为什么大量出错?该从哪方面来分析?4.大量服务端excep ...

  5. <2016-1-29>

    1.打电话,发短信,发邮件 //打电话 <script> function call(){ var call = new CallManage(); call.call('10086'); ...

  6. 导出DBF,并且提供下载 [转]

    导出DBF,并且提供下载 #region Declare string mFilePath = MapPath("../DataTmp/");                str ...

  7. 反转链表,时间复杂度O(n),空间复杂度O(1)

    原理:使用三个指针,p,q指向交换的元素,r指向后续元素 代码如下: class Node{ int data; Node next; Node(int data){ this.data=data; ...

  8. web app开发之rem

    CSS3新增了一个相对单位rem,官方的解释为“font size of the root element”,相对于根元素(html)的font size. rem,em,px单位的区别: rem单位 ...

  9. php 教程列表

    php教程 php概述 php环境搭建 PHP书写格式 php变量 php常量 PHP注释 php字符串 string PHP整型 integer PHP浮点型 float php布尔型 php数据类 ...

  10. 【简洁之美】裴波那切数列生成器 python

    裴波那切数列可以用生成器较好的去生成,直接上代码: # 1 控制最大数字版本 def fib(max): x,y = 0,1 while y < max: yield x x,y = y,x+y ...