SQLiteException: no such column: _id: for ContentProvider
I think while creating table your are doing a mistake. You alredy gave " ID " inside the quotes plus you are also having NoteItems._ID
which makes it "_id ID " as Primary ID. So you may need to correct it..!!
@Override public void onCreate(SQLiteDatabase db) { db.execSQL("CREATE TABLE IF NOT EXISTS " + TABLE_NAME + " (" + NoteItems._ID + " ID INTEGER PRIMARY KEY AUTOINCREMENT, " + NoteItems.TITLE + " TEXT, " + NoteItems.TEXT + " TEXT);"); }
@Override public void onCreate(SQLiteDatabase db) { db.execSQL("CREATE TABLE IF NOT EXISTS " + TABLE_NAME + " (" + NoteItems._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + NoteItems.TITLE + " TEXT, " + NoteItems.TEXT + " TEXT);"); }
After change uninstall and run again