我创建了这张表:
"create table " + DATABASE_TABLE + " ("
+ KEY_ROWID + " integer primary key autoincrement not null, "
+ KEY_TITLE + " text not null, "
+ KEY_BODY + " text not null, " + KEY_DATE_TIME + " text not null);"
这是我为插入所做的:
ContentValues initialValues = new ContentValues();
initialValues.put("title", title);
initialValues.put("body", body);
initialValues.put("abc", anc);
return mDb.insert(DATABASE_TABLE, null, initialValues);
但由于一些错误,我的应用程序强制关闭。请帮帮我...
Logcat 错误:
java.lang.NullPointerException
com.maddy.task_reminder.ReminderDbAdapter.createReminder(ReminderDbAdapter.java:133)
06-09 23:28:44.112: E/AndroidRuntime(412): at com.maddy.task_reminder.edit_activity$4.onClick(edit_activity.java:143)