java.lang.IllegalArgumentException: column '_id' does not exist contentProvider

CusorAdapter の projection には _id カラムをいれておけ.

...
static final String[] CONTACTS_SUMMARY_PROJECTION = new String[] {
    Contacts._ID,   // 無駄に入れておく
    Contacts.DISPLAY_NAME,
    Contacts.CONTACT_STATUS,
    Contacts.CONTACT_PRESENCE,
    Contacts.PHOTO_ID,
    Contacts.LOOKUP_KEY,
};

public Loader<Cursor> onCreateLoader(int id, Bundle args) {
    // ...
    return new CursorLoader(getActivity(), baseUri,
            CONTACTS_SUMMARY_PROJECTION, select, null,
            Contacts.DISPLAY_NAME + " COLLATE LOCALIZED ASC");
}
...

listview - Android column '_id' does not exist? - Stack Overflow


関連ワード:  Android今さら聞けない初心者開発