简体   繁体   中英

Not enough memory to run HAXM on ubuntu

HAXM问题

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

I fixed the bug by switching from Ubuntu 22.04 to Ubuntu 20.04

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM