public static final String TABLE_TASKS = "tasks";
public static final String COLUMN_ID = "_id";
public static final String COLUMN_TASK = "task";
public static final String COLUMN_TIME = "time";
public static final String COLUMN_INITDATE = "initdate";
public static final String COLUMN_PRIORITY="priority";
public static final String TABLE_REPEAT = "alarms";
public static final String COLUMN_AID = "_aid";
public static final String COLUMN_TID = "tid";
public static final String COLUMN_DAYS = "days";
private static final String DATABASE1_CREATE = "create table " + TABLE_TASKS + "("
+ COLUMN_ID + " integer primary key autoincrement, "+ COLUMN_TASK
+ " text not null, "+ COLUMN_TIME+" integer not null, "+ COLUMN_INITDATE+" integer not null, "+ COLUMN_PRIORITY +" integer );";
private static final String DATABASE2_CREATE = "create table " + TABLE_REPEAT + "("
+ COLUMN_AID + " integer primary key autoincrement, "+ " FOREIGN KEY (" + COLUMN_TID + ") REFERENCES " + TABLE_TASKS + " ( " + COLUMN_ID + " ), "+ COLUMN_DAYS + " text not null );";
私のlogcatは次のとおりです:03-06 09:17:07.051:E / AndroidRuntime(1029):java.lang.RuntimeException:アクティビティを開始できませんComponentInfo {com.example.habitator / com.example.habitator.Habitator}:android。 database.sqlite.SQLiteException:外部キー定義の不明な列 "tid"(コード1):、コンパイル中:テーブルアラームの作成(_aid整数主キー自動インクリメント、FOREIGN KEY(tid)REFERENCESタスク(_id)、日数テキストがnullではありません) ;
plsは私がエラーを見つけるのを助けます!! なぜ私のプログラムがクラッシュするのですか?