引用:
http://stackoverflow.com/questions/11539657/open-failed-ebusy-device-or-resource-busy
I 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).
本文介绍了一个常见问题的解决方案:在Android系统中删除文件时遇到EBUSY(设备或资源忙)错误。该问题与FAT32文件系统有关,在尝试删除文件前进行重命名可以有效避免这一错误。
4273

被折叠的 条评论
为什么被折叠?



