爱若晨风 发表于 2016-11-29 09:15:36

SQLite : column '_id' does not exist

  错误: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.eoeAndroid.SQLite/com.eoeAndroid.SQLite.ActivityMain}: java.lang.IllegalArgumentException: column '_id' does not exist
  解决:关于这一部分,必须注意sqlite的主键命名,由于simpleCursorAdapter的方法只识别_id,所以,当你用到sqlite的simpleCursorAdapter时,必须把数据表的主键命名为_id。否则就会出现java.lang.IllegalArgumentException: column '_id' does not exist错误。
页: [1]
查看完整版本: SQLite : column '_id' does not exist