Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.io.IOException: No space left on device Android

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

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 .

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.

  • Have you ever run in two some thing like that?
  • Any ideas about what changed in Android (2.x) and how they fix it in Android (3+)?

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

like image 202
Ilya Gazman Avatar asked May 06 '12 08:05

Ilya Gazman


1 Answers

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

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: 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">

Edit

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.

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

like image 183
k3b Avatar answered Sep 28 '22 08:09

k3b