How can I change the ram amount that the android emulator is using?
Solution 1
My answer seems to be old, so for recent versions check this answer
Go to Tools->Android->AVD Manager
, there's something like pencil to edit your AVD
click on that, then in the pop-up window click Show Advanced Settings
and there you can change the RAM
size.
Solution 2
I generated a Pixel 2 image in the past and those values were locked to match the HW default of 1536
MB, so to edit them I had to "Show on disk" (from ADV manager) and edit the hw.ramSize
keys in hardware-qemu.ini
and config.ini
Solution 3
Create a new virtual device from the AVD Manager.
Select New hardware profile(left-bottom corner) in the appearing window.
You can see an option Memory in the new secondly appeared window. Here you can change the ram size in the column RAM.
Solution 4
or you can create a new hardware profile, that allows you to choose the amount of ram avaliable. Also you can change the number of CPU cores in the hardware-quemu.ini and config.ini on the device files.
Related videos on Youtube
Arda Çebi
Updated on December 27, 2021Comments
-
Arda Çebi over 2 years
at the first setup, Android Studio asked me that how much ram does the emulator going to use. I entered 800M but it worked slowly. I need to make it a little bit bigger like 1.5GB. How can I do that? Is it editable after the first setup?
-
Frederic Klein over 7 yearsPossible duplicate of Why emulator is very slow in Android Studio?
-
-
Arda Çebi over 7 yearsI was testing my app's on the virtual device instead of Note 5 that has samsung modified Android. It was running so slow. Thank you so much.
-
Masked Man over 7 years
Happy Coding
:)
-
Arda Çebi over 6 yearsThe problem is already this. There is a minimum RAM setting in the emulator. I need to change this. Otherwise doing the thing you suggested with this answer is impossible. The first answer works.
-
Cícero Moura about 3 yearsThat was what I was looking for! Thanks
-
DYS almost 3 yearsAs I check, the RAM size and vm size are disabled for modification.
-
Praveen Singh almost 3 yearsThanks for this solution.
-
Fernando Torres over 2 yearsThat does'nt worked
-
Fernando Torres over 2 yearsPlease note if you make a new profile you won't be able to choose a device with google play services
-
Masked Man over 2 years@FernandoTorres Updated the answer