Tag Archives: On Java. Lang. IllegalArgumentEx

java.lang.IllegalArgumentException: column ‘_id’ does not exist

About java.lang.IllegalArgumentException Error in simplecursoradapter ‘column’_ ID ‘does not exist problem:

Simplecursoradapter inherits from the cursoradapter. This class has an implicit rule that there must be a_ The ID field.

The way to solve this problem is:

1. Double name the database table, and name the self growing primary key as_ id

2. When using database query language, use db.rawQuery (select * from Biao, null) —- there are_ ID field

3. Use db.rawQuery (select id as _ ID, name from Biao)_ ID.

That is to say, you must find it when querying_ ID column.