且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

java.io.IOException:设备Android上没有剩余空间

更新时间:2022-11-17 10:25:13

添加绝对文件路径的日志输出,这可能会导致异常.

adding a loging-output of the absolute filepath, that caused the exception might help.

如果将写入的文件写入本地内存文件系统而不是sd卡文件系统,则可能的解决方法是:

if the file beeing written was written to local memory file-system and not to sd-card-filesystem here is a possible solution:

java.io.IOException:设备上没有剩余空间是指设备的内部存储文件系统上没有足够的内存.

java.io.IOException: No space left on device my mean that there is not enought memory left on the internal storage file system of the device.

您可以尝试在卡上安装该应用,而不是在清单文件中设置一个条目:

You can try to install the app on the sd-card instead by setting an entry in the manifest-file:

  <manifest ..... android:installLocation="preferExternal">

编辑

如果应用程序安装在内部存储器中,则它的本地文件也存储在本地存储器中.如果将应用安装在SD卡上,它的本地文件也存储在SD卡上.

if an app is installed in internal memory it-s local files are stored in local memory, too. if an app is installed on sd-cardit it-s local files are stored on sd-card, too.

因此在sd卡上安装该应用程序可能会解决您的问题.

so installing the app on sd-card might solve your problem.