开发者

Android delete file error

开发者 https://www.devze.com 2023-03-13 03:32 出处:网络
I use this code for deleting my database: File开发者_开发百科 file = new File(DB_PATH , DB_NAME);

I use this code for deleting my database:

 File开发者_开发百科 file = new File(DB_PATH , DB_NAME);
 file.delete();

It deletes my database, but the application then stop running.

It's ok when I just initialise file, se the problem is with file.delete();

Any ideas, if it works, why it breaks down my app every time?


Try context.deleteDatabase(dbpath);

0

精彩评论

暂无评论...
验证码 换一张
取 消