我正在创建一个像这样的表
// Required variables for Collection table
private static final String TABLE_COLLECTION = "collection";
private static final String KEY_TIME = "time";
private static final String KEY_CUSTOMER_ID = "cust_id";
private static final String KEY_AMOUNT = "amount";
private static final String KEY_CHEQ_NO = "cheq_no";
private static final String KEY_LATITUDE = "latitude";
private static final String KEY_LONGTITUDE = "longtitude";
String CREATE_COLLECTION_TABLE = "CREATE TABLE " + TABLE_COLLECTION
+ "(" + KEY_TIME + " TEXT PRIMARY KEY, " + KEY_CUSTOMER_ID
+ " TEXT, " + KEY_AMOUNT + " INTEGER, " + KEY_CHEQ_NO + " INTEGER, " + KEY_LATITUDE + " REAL, " + KEY_LONGTITUDE + " REAL)";
但是当我执行以下查询时,它说没有名为latitude的列。
String INSERT_QUERY = "INSERT INTO " + TABLE_COLLECTION + "(" + KEY_TIME + ", " + KEY_CUSTOMER_ID + ", " + KEY_AMOUNT + ", " + KEY_CHEQ_NO + ", " + KEY_LATITUDE + ", " + KEY_LONGTITUDE + ") VALUES ('" + time + "', '" + cust_id + "', " + amount + ", " + cheq_no + ", " + lat + ", " + lon + ")";
P.S:尝试了ContentValues,但它也提供了同样的例外。