您可能没有写是设备上的数据库,但在您的计算机上的文件夹中。您可以尝试具有应用程序本身做一些测试数据库的更新,让你知道它正在更新设备上的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