I\'m trying to debug my application on a real device but I get this error:
ERROR/AndroidRuntime(981): Caused by: java.lang.IllegalArgumentException:
You are trying to use a cursor that REQUIRES a column called _id. Its as simple as editing your table creation statement and adding a column called _id.
Its declartion looks something like this:
_id INTEGER PRIMARY KEY AUTOINCREMENT
Add this and you will then be able to use it. I believe this is a requirement that is required in order to use a SimpleCursorAdapter.
UPDATE
"CREATE TABLE IF NOT EXISTS contact_data( _id INTEGER PRIMARY KEY AUTOINCREMENT, contact_id INTEGER, contact_name VARCHAR(50), number_type VARCHAR(50), contact_number VARCHAR(50), duration TIME, duration_sum TIME, date DATE, current_time TIME, cont INTEGER, type VARCHAR, month VARCHAR(50), day VARCHAR(50), year VARCHAR(50));"
Solution: add a space between the left parenthesis '(' and _id