Failed to free up 208019456 on /data; final free space 141062144: - android

I am getting the following error while running an android app in Android Studio 3.2
2018-10-25 00:47:41.743 1709-1709/? E/installd: Failed to free up 208019456 on /data; final free space 141062144: Success
2018-10-25 00:47:41.744 1839-1946/? W/DeviceStorageMonitorService: java.io.IOException: Failed to free 208019456 on storage device at /data
at com.android.server.pm.PackageManagerService.freeStorage(PackageManagerService.java:4656)
at com.android.server.storage.DeviceStorageMonitorService.check(DeviceStorageMonitorService.java:194)
at com.android.server.storage.DeviceStorageMonitorService.access$100(DeviceStorageMonitorService.java:73)
at com.android.server.storage.DeviceStorageMonitorService$1.handleMessage(DeviceStorageMonitorService.java:258)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)

I solve this issue by:
Open AVD Manager Then on My Android Emulator choose Wipe Data from option.

I tried to find the solution myself and found that the Android Emulator was not able to delete the "temporary data" from the device after closing the app.
To solve this issue:
I had to delete the content of /data folder from the android emulator.
Basically, some apps create temporary data in the device. If the App fails to delete those files on exit, due to crash or some other reason, they start accumulating and take up space in memory, this results in the error: "W/DeviceStorageMonitorService: java.io.IOException: Failed to free 208019456 on storage device at /data"

Related

Failed build Project after change directory to external storage; Timeout waiting to lock Java compile cache (/.gradle/7.0.2/javaCompile)

I have an issue when building project after created a new project in different volumes in Mac Os.
This what error said :
Could not create service of type DefaultGeneralCompileCaches using GradleScopeCompileServices.createGeneralCompileCaches().
> Timeout waiting to lock Java compile cache (/Volumes/SDMICRO/ANDROID/AwPlayerTes/.gradle/7.0.2/javaCompile). It is currently in use by another Gradle instance.
Owner PID: unknown
Our PID: 2394
Owner Operation: unknown
Our operation:
Lock file: /Volumes/SDMICRO/ANDROID/AwPlayerTes/.gradle/7.0.2/javaCompile/javaCompile.lock
Actually this is not my true directory in development project. But i have no choices because of run out of space. But this project are failure build. I have tried some solution like this. But none of them are works, FYI i use Mac and Android Studio Archtic Fox.
Please someone help me
please try to delete the Lock file, and then rebuild the project.
I encoutered the same problem and already solved it.

android writing to shared preference getting java.io.IOException: write failed: ENOSPC (No space left on device)

I am downloading files from Internet but I am getting such error. on committing shared preference data
W/SharedPreferencesImpl: writeToFile: Got exception:
java.io.IOException: write failed: ENOSPC (No space left on device)
at libcore.io.IoBridge.write(IoBridge.java:501)
at java.io.FileOutputStream.write(FileOutputStream.java:316)
at com.android.internal.util.FastXmlSerializer.flushBytes(FastXmlSerializer.java:233)
at com.android.internal.util.FastXmlSerializer.flush(FastXmlSerializer.java:254)
at com.android.internal.util.FastXmlSerializer.endDocument(FastXmlSerializer.java:199)
at com.android.internal.util.XmlUtils.writeMapXml(XmlUtils.java:193)
at android.app.SharedPreferencesImpl.writeToFile(SharedPreferencesImpl.java:600)
at android.app.SharedPreferencesImpl.-wrap2(SharedPreferencesImpl.java)
at android.app.SharedPreferencesImpl$2.run(SharedPreferencesImpl.java:515)
at android.app.SharedPreferencesImpl.enqueueDiskWrite(SharedPreferencesImpl.java:536)
at android.app.SharedPreferencesImpl.-wrap0(SharedPreferencesImpl.java)
at android.app.SharedPreferencesImpl$EditorImpl.commit(SharedPreferencesImpl.java:458)
can anybody help me to solve this problem?
java.io.IOException: No space left on device means there is not enough memory left in internal storage your device. As I can see you have enough memory in your storage. Uninstall the app and install it again.If it is not working, try to install you app in SD card.
Add android:installLocation="preferExternal" in your manifest file.
I think installing the app in SD Card may solve your problem.

Cannot run an android code on Processing

When I try to run an android code in Processing 2.2.1 Android mode I get the following message:
Error from inside the Android tools, check the console.
And then:
java.io.FileNotFoundException: C:\Users\USER\Documents\Processing\modes\AndroidMode\icons\icon-96.png (The system cannot locate the resource specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at processing.app.Base.copyFile(Base.java:2698)
at processing.mode.android.AndroidBuild.writeRes(AndroidBuild.java:807)
at processing.mode.android.AndroidBuild.createProject(AndroidBuild.java:169)
at processing.mode.android.AndroidBuild.build(AndroidBuild.java:91)
at processing.mode.android.AndroidMode.handleRunDevice(AndroidMode.java:227)
at processing.mode.android.AndroidEditor$16.run(AndroidEditor.java:513)
BUILD FAILED
C:\Users\USER\AppData\Local\Temp\android9132488509980035650sketch\build.xml:9: The entity name must immediately follow the '&' in the entity reference.
Total time: 0 seconds
What can I do to solve it? I am a total beginner so please try to be as specific and clear as possible.
Thanks!
Program wants this file "C:\Users\USER\Documents\Processing\modes\AndroidMode\icons\icon-96.png" and cannot find it.

Android Studio static = libcore.io.Posix ENOENT exception

I am trying to run my app on a emulator. It used to work but now it does not load properly. The debug error I get is:
static = libcore.io.Posix
Exception = {android.system.ErrnoException#3564}
When I right click on the Exception line and Copy Value I get:
android.system.ErrnoException: stat failed: ENOENT (No such file or directory)
My app does not have any file io programed so the exception must relate to something the system requires.
Looking back in the LogCat I get a match for ENOENT, several lines before are:
com.google.process.location W/art? Suspending all threads took: 7.795ms
com.google.process.location I/art? Background partial concurrent mark sweep GC freed 2094(165KB) AllocSpace objects, 0(0B) LOS objects, 40% free, 3MB/5MB, paused 9.486ms total 274.854ms
com.google.process.location I/GCoreUlr? DispatchingService.onCreate()
com.google.process.location I/GCoreUlr? WorldUpdater received intent Intent { act=com.google.android.location.reporting.ACTION_UPDATE_WORLD cmp=com.google.android.gms/com.google.android.location.reporting.service.DispatchingService (has extras) } with receiverAction android.location.PROVIDERS_CHANGED
com.google.process.location E/copresGcore? Couldn't load settings: /data/data/com.google.android.gms/files/copresence_settings: open failed: ENOENT (No such file or directory)
I cannot see what file it cannot read/write to. I do not have any file IO programmed but I am using sqlite3, maybe to system cannot find the database file.
To get some relief from this error for a while I created a new project in Android Studio. Shut down AS and copied my source files into the new AS project. Then when I ran the new project, the error had gone. It came back after several hours of programing and editing.
I have looked for solutions on the internet for 2 days now without success. Any help would be appreciated.
Further details:
If I run (not debug) the app on the emulator or the device it works.
If I run/debug on the emulator or the device it crashes with the same libcore exception.
Part conclusion: it is something to do with debugging.
I thought I had come across a workaround:
I closed the existing AVD
I ran the AVD from the AS AVD manager
I re-installed the app: adb install -r C:\Users...\app-debug.apk
I ran the app from AS by pushing the debug button
This worked once then the libcore error appeared. This workaround is not good, even if it worked, as the edit run/cycle is too long.
I think the only way is to breakpoint the Google source to determine what it is excepting on. I spent much time searching the internet to find out how to do this without success. If anybody can point me to relevant articles I would be grateful.
I raised Android Open Source Project issue 126510. The comments by jcossi...#gmail.com gave the answer. I had turned on "Java Exception Breakpoints" with "Any exception" checked. This caused the problem when I restarted the project. I seems that applications may use exception handling for not just errors. So if you use "Any exception" be sure to remember to disable it again ASAP.
This answer helped me a lot, but I found that I had to uncheck some of the other fields on the right side of the box.
It seems that this should be a bug in Android Studio - using a provided feature disables the debugger, with no apparent reason or warning.

I got an installation error, and don't know what to do

When I run my application it does not launch, and shows me this message in Console:
[2012-05-20 17:36:58 - TravelersDictionary] Installation error:
INSTALL_FAILED_INSUFFICIENT_STORAGE
[2012-05-20 17:36:58 - TravelersDictionary] Please check logcat output for more details.
[2012-05-20 17:36:58 - TravelersDictionary] Launch canceled!
I did check my Logcat but there is nothing written in red.
Here is the last 5 logcat messages:
05-20 14:37:36.520: D/ExchangeService(438): Received deviceId from Email app: androidc259148960
05-20 14:37:36.520: D/ExchangeService(438): Reconciling accounts...
05-20 14:37:48.555: W/ThrottleService(75): unable to find stats for iface rmnet0
05-20 14:44:00.404: D/dalvikvm(75): GC_CONCURRENT freed 648K, 13% free 8475K/9735K, paused 12ms+11ms
05-20 14:44:32.975: D/dalvikvm(170): GC_CONCURRENT freed 397K, 13% free 6241K/7111K, paused 8ms+7ms
You get the next error: Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE and as the error said you don't have enough space in your device to install the app, therefore delete some unwanted apps and other data and try again.
it seems that your device is running out of internal storage space, where the application are typically installed. You have two options. Remove some application, or, since you are developing, if you are is going to target API level grater than 8 (Android 2.2), you can set the android:installLocation="preferExternal", in the AndroidManifest.xml file. Android will try to install the application in the external storage, as the doc says:
If you declare "preferExternal", you request that your application be
installed on the external storage, but the system does not guarantee
that your application will be installed on the external storage. If
the external storage is full, the system will install it on the
internal storage.

Categories

Resources