0
有沒有人知道如何在每次我的應用程序在真實設備中執行時重置數據庫?每當我的應用程序運行時數據庫都會清空
目前,我有這個代碼,但它不工作...
public void doDBCheck()
{
try{
File file = new File(context.getExternalFilesDir(null).getAbsolutePath());
file.delete();
}catch(Exception ex)
{
}
}
任何解決方案?
in emulator or real device? –
它在真實的設備上 – edmund02
http://stackoverflow.com/questions/4406067/how-to-delete-sqlite-database-from-android-programmatically –