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 –