java.io.IOException:设备Android上没有剩余空间 [英] java.io.IOException: No space left on device Android

查看:157
本文介绍了java.io.IOException:设备Android上没有剩余空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在android市场上有应用程序,我们的用户从这个错误中得到了很多: java.io.IOException:设备上没有剩余空间

We have application on android market, our users getting a lot from this error: java.io.IOException: No space left on device

根据到目前为止的发现,我知道它们的外部存储空间还足够,这仅在Android 2.x上发生.

From what I found out so far, I know that they got enough space left on they external storage, and it's only happen on Android 2.x .

我对Linux文件系统进行了少量研究,发现除了空间限制之外,每个目录中的文件数和根目录下文件的总数也受到限制.但是看来我们的应用程序并没有实现任何目标.

I had a small research in Linux file system, and I found out that beyond the space limitation there are limitation on number of files in each directory and the total number of files under root directory. But it looks like our app is not hitting any of those.

  • 您曾经遇到过类似的两件事吗?
  • 关于Android(2.x)中发生了什么变化以及如何在Android(3+)中进行修复的任何想法?

编辑:这不是安装问题,而是在尝试保存下载的文件时.

this is not installation problem, but when trying to save downloaded files.

推荐答案

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

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.

这篇关于java.io.IOException:设备Android上没有剩余空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆