AVD doesn't stop to consume disk space
Asked Answered
G

3

10

I don't have any android device so I need to use the AVD to test my app.

Unfortunately, and I can't understand why, the emulator doesn't stop to take all the space in my hard drive while I'm running the app (keep writing all the time and get all space). Now I have less than 2 GB of free disk space, and even if I delete all devices from AVD I can't get a lot of space back.

Does anyone know how to solve this problem? Need to unistall android studio?

UPDATE

Today I was able to free enough space to have 3 GB free space disk, so a created a new emulator and by lunch time I left my desk with the AVD emulator open and 2 GB free space disk. One hour later I came back and only have 500 KB left at my HD. I was testing an app with not even one writing task and he was on background state during my lunch time. Have no idea what to do.

Giffy answered 8/3, 2019 at 11:26 Comment(3)
I got the same problem with yours. Did you find any solution to avoid it?Coral
Look for c:\users\<username>\.android\.avd folder. If you are creating avd over and over data of avd or deleted avd still exists here.Mcmanus
I have the same issue. Each AVD devices takes up around 8GB + the System Image (API Level 29, 30, 31, etc.) My solution has been to use one emulator targeting API Level 30. This seems to work, and only uses 18GB, but prevents me from QAing older API Levels or different device sizes and layouts.Pals
R
3

What is the size on disk of your AVDs?

enter image description here

Did you try to show on disk or wipe data?

enter image description here

What about their configuration?

enter image description here

You can try SpaceSniffer to see where is your storage going.

enter image description here

Delete Emulator’s Temp Files temp folder which located in this directory C:\Users\[username]\AppData\Local\Temp\AndroidEmulator .

enter image description here

Delete Old Version Android Studio

It isn't normal to your AVD taking up space, because they're empty. So...it's the application you're developing doing some write task? Maybe is the Android updating itself?

Resort answered 8/3, 2019 at 12:1 Comment(1)
My temp directory is empty and i just have one version of android studio installed. Have no idea about what to doGiffy
M
3

Look for

c:/users/username/.android/.avd

(Where username is the name of your windows user account.)

folder. If you are creating avd over and over data of avd or deleted avd still exists at this location.

Mcmanus answered 23/2, 2021 at 6:21 Comment(2)
Any idea as to why these aren't simply deleted? I ran out of space and just happened to find emulators from 2+ years ago, freed up 12gb :OSubspecies
@Subspecies you can take a look at https://mcmap.net/q/112700/-can-39-t-delete-avd-from-avd-manager-in-android-studio if you are on windows you can check that avd folder in resource monitor -> cpu -> search handles -> paste dir path and you will be able to see what's blocking the dir from deletionMcmanus
H
0

One of the issues is that Android Studio temp files are accumulated under Windows under the AppData directory and are not deleted (C:\Users\NyAccount\AppData\Local\Temp). Of course not all the temporary files in this directory are Android Studio directories since the entire system uses it but a lot of my temp files here were generated by Android Studio. The contents of this directory can be deleted (except for temp files generated by currently running processes). In my case this was many gb.

Heterosis answered 27/5 at 14:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.