Java.io.IOException: no space left on Android device

We have an application on the Android market, our users get a lot from this error: java.io.IOException: there is no place on the device

From what I have learned so far, I know that they have enough free space on external storage, and this only happens on Android 2.x.

I had a little research on the Linux file system, and I found out that beyond the space limit there is a limit on the number of files in each directory and the total number of files in the root directory. But it seems that our application does not fall into any of them.

  • Have you ever run in two such things?
  • Any ideas on what has changed in Android (2.x) and how do they fix it in Android (3+)?

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

+6
source share
2 answers

adding the logical output of the absolute path to the file, which would throw an exception.

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

java.io.IOException: No space left on device I mean that there is not enough memory java.io.IOException: No space left on device file system of the device’s internal file system .

You can try installing the application on the SD card by setting the entry in the manifest file:

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

Edit

If the application is installed in internal memory, local local storage files are also stored in local memory. if the application is installed on an sd-card, its local files are also stored on the SD card.

therefore, installing the application on an SD card may solve your problem.

+4
source

I believe (if I'm not mistaken) that there may be a problem opening a large file or any file that will move the maximum eternal storage after all the space has been used. For example: my android had no problems until I used all the space on my device until the very last bit. If I do not update or delete all my favorite songs and movies, this will not work. Tested and tried. But again, the error may be more flexible and mean something else ...: D

0
source

Source: https://habr.com/ru/post/915010/


All Articles