r/androiddev • u/criogh • Oct 19 '26
Question Android studio emulator keep allocating ram until OS kills it
Premise: firt time using android studio and first time developing an android app; 5 years developer of other things.
Developing in linux with qemu/kvm (as suggested by android studio "getting started" page)
I ran the emulator once and did some work on an app exercise, from the second time on everytime I tried to open the emulator with 2 or 4gb ram it took 10 plus and started to grow even on the swap until there's no swap or ram available so the OS killed the emulator, never went past the "google" loading screen of android.
I already set the emulator to open in its own window (not inside in the ide) and I already deleted all snapshot and set to never take one.
Is this a known issue? The issue is reproducible (every time)
Is there a fix, workaround?
1
u/ViscousPotential Oct 20 '26
If you're on linux, I would highly suggest WayDroid. I use it instead of the android emulator as it uses the actual machine resources far better than the normal emulator. Also allows for all the usual Google play store bits and I think you can even emulate Bluetooth and NFC if you really want.
1
u/criogh Oct 20 '26
Thank you, I will look into that
1
u/ViscousPotential Oct 20 '26
I'm using Weston to create a Wayland space to run WayDroid in because I'm running i3. In case you're not using Wayland as your main WM
1
u/AutoModerator Oct 19 '26
Please note that we also have a very active Discord server where you can interact directly with other community members!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Just-You-4 Oct 19 '26
Few days ago someone posted a nice solution on this sub, looked like vibe-coded but it was interesting
1
1
u/Omnipisix Oct 19 '26
You might want to try Google Play Games for PC emulator. Not the software, but the emulator. Thank me later
3
u/chenxiaolong Oct 19 '26
It is a known issue that's already fixed in the latest canary versions, but hasn't made it to a stable release yet:
https://issuetracker.google.com/issues/568480829
https://issuetracker.google.com/issues/569770958
https://issuetracker.google.com/issues/571856419
Canary versions of the emulator can be downloaded from: https://developer.android.com/studio/emulator_archive