当前位置: 代码迷 >> Android >> bug改得小弟我都崩溃了快
  详细解决方案

bug改得小弟我都崩溃了快

热度:21   发布时间:2016-04-28 06:31:08.0
bug改得我都崩溃了快
什么andriod系统的bug,fat32的bug 这种奇怪的bug真让人无语 have the big Answer!! The Problem comes from the Android System or / and the FAT32 system. I can not explain how the system get the error, it has something to do with deleting files and the FAT32 System.

But the solution is really easy: Before you delete a Directory or File: rename it!

Code to rename:

final File to = new File(file.getAbsolutePath() + System.currentTimeMillis());
file.renameTo(to);
to.delete();Thats it, if you rename the folder or file before you delete it, there is no chance for the system to try to open an existing file again or an open file wich you want to save again (or something like this).

------解决方案--------------------
你这个颜色的字体。重贴一下吧,,,
------解决方案--------------------
你的字看的我要奔溃了!
  相关解决方案