您可能沒有寫是設備上的數據庫,但在您的計算機上的文件夾中。您可以嘗試具有應用程序本身做一些測試數據庫的更新,讓你知道它正在更新設備上的SQLite數據庫:
public class SQLHelper extends SQLiteOpenHelper {
private static final int DATABASE_VERSION = 2;
private static final String DATABASE_NAME = "name goes here";
private static final String[] KEYS = {"column","names","go","here"};
private static final String DICTIONARY_TABLE_NAME = "tablename";
private static final String DICTIONARY_TABLE_CREATE =
"CREATE TABLE " + DICTIONARY_TABLE_NAME + " (" +
KEY[0] + " TEXT, " +
KEY[1] + " TEXT, " . . .;
public SQLHelper(Context context) {
super(context, DATABASE_NAME , null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
// creates table if does not exist
db.execSQL(DICTIONARY_TABLE_CREATE);
// . . . update database with test info here...
db.execSQL("INSERT INTO . . .");
db.execSQL("UPDATE . . .");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
// TODO Auto-generated method stub
}
}
你怎麼分貝從你的補償傳輸到設備?另外,你的Galaxy S3是否已經紮根? – Jakar 2014-10-16 22:28:24