开发者

Android delete file error

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜