Recently I installed Ubuntu instead of Windows and now I was trying to run an android emulator when I faced this issue. I have 16 GB of RAM of which more than 9 are available. I've already installed kvm and virtualization is enabled in BIOS and my processor supports it. I'd like to get your help and really grateful for any help I can get
Asked
Active
Viewed 518 times
-2
-
If I remember correctly on windows the HAXM installer asks how much RAM HAXM should be configured to be able to use. Most likely this setting is too small on your system. – Robert Jul 13 '22 at 16:24
-
@Robert I remember that option too, but in Ubuntu I have not seen it, unfortunately. All I can do is to change memory settings through Help -> Change memory settings. I set that value to 4096 but still get the same issue – Yevhenii Orlov Jul 14 '22 at 05:06
2 Answers
0
Android studio seems to integrate a version of java that is buggy in its available RAM space on Linux.
This leads to the following error HAXM: "Device Manager" : not engough memory to run HAXM Get more available memory for HAXM
The solution we found to "work around" this problem is to install the java 12 version manually instead of the java 11 version that is provided.
For that download the java 12 version available and put inside your android-studio.
Next, Modify the studio.sh file as follows:
add the line :
# ---------------------------------------------------------------------
# Locate a JDK installation directory command -v will be used to run the IDE.
# Try (in order): $STUDIO_JDK, .../studio.jdk, .../jbr[-x86], $JDK_HOME, $JAVA_HOME, "java" in $PATH.
# ---------------------------------------------------------------------
STUDIO_JDK="/path/to/android-studio/jdk-12"

Vincent
- 1