解决方案 »

  1.   

    我看到错误原因是
    Failed to read row 0, column -1 from a CursorWindow which has 1 rows, 3 columns.
    LZ可以从这部分入手查找原因
      

  2.   

    你可以看Logcat程序中哪句抛出异常,然后在追查下去
    我觉得
    TextView nameTextView = (TextView) view.findViewById(R.id.time_view);
            nameTextView.setText(cursor.getString(cursor.getColumnIndex(a)));
            TextView valueTextView = (TextView) view.findViewById(R.id.notes_view);
            valueTextView.setText(cursor.getString(cursor.getColumnIndex(b)));
    会不会是你的SQLite文件中的表没有列变量没有"1"或者"2",所以才返回column -1
      

  3.   

    你可以看Logcat程序中哪句抛出异常,然后在追查下去
    我觉得
    TextView nameTextView = (TextView) view.findViewById(R.id.time_view);
            nameTextView.setText(cursor.getString(cursor.getColumnIndex(a)));
            TextView valueTextView = (TextView) view.findViewById(R.id.notes_view);
            valueTextView.setText(cursor.getString(cursor.getColumnIndex(b)));
    会不会是你的SQLite文件中的表没有列变量没有"1"或者"2",所以才返回column -1
    已经解决了,是我在传递参数的过程中有些地方不统一才导致的后果,现在已经解决了~谢了
      

  4.   

    lz,你的错误是不是在
     nameTextView.setText(cursor.getString(cursor.getColumnIndex(a)));
    中,将a改为TIMETRACKER_COLUMN_ID ,以此类推
    我遇到了同样的报错,不知道是什么问题,麻烦指导下,你说的传递参数不统一是在哪里啊?谢谢