【发布时间】:2011-08-15 01:33:30
【问题描述】:
我收到了这个错误
IllegalArgumentException:列“_id”不存在
当使用SimpleCursorAdapter 从我的数据库中检索时,该表确实有这个_id 列。注意到这是一个常见问题,我尝试通过一些在线解决方案来解决它,但它们都不起作用。这是我的光标查询:
SimpleCursorAdapter mAdapter = new SimpleCursorAdapter(this, R.layout.quoterow, myCursor, new String[]{"_id", "quote"}, new int[]{R.id.quote});
虽然我应该提到原来没有包含_id 列,但我最近添加了这个以尝试解决问题。有没有人有任何可能有助于解决问题的想法?
【问题讨论】:
标签: android sqlite android-sqlite android-cursoradapter