Related
I'm running Android Studio 4.1.1 on Windows 10 Pro with Hyper-V disabled.
I just upgraded to Emulator 30.5.4 and HAMX 7.6.5. Now when I try to
run the Emulator it disconnects on start up. Has anyone else run into something
similar? Thanks!
Try my documentation I wrote to setup your Emulator properly for an AMD CPU (Seems you have one).
For Intel you need to Uncheck the Use Host GPU checkbox - in the emulator settings. And also disable your Hyper-V in Windows Feature Settings
PS: If you use HP SureClick - remove it.
I keep that post updated, like all my posts, to ensure a complete solution. :)
I tried to run my Hello World application in Android Studio. I got the following error:
Emulator: ERROR: x86 emulation currently requires hardware
acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!
Can you tell me what I can do with the error?
As per this response, the complete steps are:
1) Open SDK Manager (In Android Studio, go to Tools > Android > SDK Manager) and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't.
2) Now go to your SDK directory C:\users\%USERNAME%\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager\ and run the file named intelhaxm-android.exe.
In case you get an error like "Intel virtualization technology (vt,vt-x) is not enabled". Go to your BIOS settings and enable Hardware Virtualization.
3) Restart Android Studio and then try to start the AVD again.
It might take a minute or 2 to show the emulator window.
[edit]
The Android developer page has been updated with an excellent guide to get an emulator up and running.
[/edit]
Install the Intel x86 Emulator Accelerator using the Android SDK Manager
If you have Android Studio installed, you can start the SDK manager via Tools -> Android -> SDK Manager.
The Android SDK Manager does not actually install HAXM, it just downloads it. In the top of the Android SDK manager window, you can find where the installer is located on your PC. Please open the subfolder extras\intel\Hardware_Accelerated_Execution_Manager, and run the installer manually: intelhaxm-android.exe.
To use the intel HAXM, you need to have a CPU with virtualization support:
Before attempting to use this type of acceleration, you should first
determine if your development system’s CPU supports one of the
following virtualization extensions technologies:
Intel Virtualization Technology (VT, VT-x, vmx) extensions
AMD Virtualization (AMD-V, SVM) extensions (only supported for Linux)
[edit]
As of Nov 27, 2019, Google has released an emulator for AMD CPUs.
[/edit]
If your CPU does not have virtualization support, you could use an ARM emulator instead:
You can edit an existing, or add a new Virtual Device in the Android
Virtual device Manager, and change CPU/ABI to ARM.
If that option is not available, you may need to change the target API of the Virtual Device, or download an
ARM system image for the API version you want using the Android SDK
manager.
I was able to resolve my problem of the missing acceleration with the following workflow on Windows 10, Lenovo, Intel Core i7 CPU:
Changed to the HAXM setup folder:
C:\Users\\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager
Opened a cmd (MS-DOS) shell Window and executed haxm_check.exe to check whether CPU supports HAXM - it outputs in my case:
VT support -- yes
NX support -- yes
So, I knew this most be a setup problem. So, I started the setup program intelhaxm-android.exe in the same folder with Admin account and removed the installed components. After that, I've attempted to re-install with the same setup program and got this output:
So, I went into the CPU section of the BIOS and turned on acceleration/Virtualization - went back to the setup program and re-ran it, this time I was pleased to see this output:
After that, I restarted Android Studio and used Tools>AVD Manager to define a new image for an emulator. I was then able to see the emulator starting up succesfully by clicking the play button in the list of emulators in the AVD Manager's list:
or by
- Opening a sample project that compiles OK
- using File > Sync Project with Gradle Files (to build all artifacts)
- Select the app item in the Android (TW) and click Run > Run 'app'
- Select the previously configured Emaulator showed me this :-)
Hope this helps to troubleshoot others with their problems that are really caused by a bad setup implementation since the missing acceleration option was silently swallowed by the Android Studio setup program ... :-(
Simple Solution :
Open Android SDK manager, on top side you can see the "Android SDK Location" go to that location and follow this path
\extras\intel\Hardware_Accelerated_Execution_Manager
here you will get "intelhaxm-android.exe" install this setup.
If you are using an AMD CPU, AMD Virtualization (CPUs such as Ryzen) is now officially supported. Make sure you have virtualization switched on in the BIOS.
In "Turn Windows Features On or Off" (you can find it through Windows Search), you'll need to enable
Windows Hypervisor Platform on Windows 10 17134.1 (1803) April 2018 update or newer (commonly not mentioned in articles)
Hyper-V
Once you restart and start up the emulator (an x86 build), it should start booting up without the mentioned error.
On Mac, the Android SDK gets installed at: /Users/username/Library/Android/sdk/, therefore, you will need to run the script as sudo, as follows:
sudo sh /Users/username/Library/Android/sdk/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh
If all goes well, the script prints the message: "Silent installation Pass!"
Then, restart Android Studio and run your app with the desired AVD.
I wasted too much time on this, I find that the AVAST is the issue!!!
If you have AVAST installed in you system, you have to:
Go to settings tab --> troubleshooting, then you should UNCHECK the
"enable hardware-assisted virtualization"
Restart your PC, the install the intelhaxm-android.exe if it is not installed.
You can find it:
C:\Users\{YOURUSERNAME}\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager
Right click on your my computer icon and the CPU will be listed on the properties page. Or open device manager and look at the CPU.
It must be an Intel processor that supports VT and NX bit (XD) - you can check your CPU # at http://ark.intel.com
Also make sure hyperV off bcdedit /set hypervisorlaunchtype off
XD bit is on bcdedit /set nx AlwaysOn
Use the installer from https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
If you're using Avast, disable "Enable hardware-assisted virtualization" under: Settings > Troubleshooting. Restart the PC and try to run the HAXM installation again
If you recently installed Docker on Windows OS, you need to turn off the Hyper-V feature. See the top answer of VT Not Supported when Installing HAXM
I solved this Issue by enabling virtualization technology from system Settings.
Just followed these steps
Restart my Computer
Continuously press Esc and then F10 to enter BIOS setup
configuration
Check Virtualization technology
Your system settings may be changed According to your Computer. You can google (how to enable virtualizatino for YOUR_PC_NAME).
I hope it helps.
A more detailed answer for dummies like me:
Open the SDK manager
Select the SDK Tools tab.
Download – Make sure that intel x86 Emulator Accelerator (HAXM) is downloaded.
Install – Now that HAXM is downloaded, make sure it is installed. In the SDK window it will show you where the SDK is located on your computer:
Click/tap 3 times quickly to highlight this text and copy the folder location. Open the file explorer and paste in the file location. From here you can search “hax” to find the folder location for HAXM stuff. Once a file comes up in the search results, right click and select “open file location”. For me the location was C:\Users\Datu1\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager . Find the file intelhaxm-android.exe and open/run it.
Follow the instructions when it runs. You may wish to run haxm_check as an administrator (it’s in this same folder), but it may or may not work for you. The surefire way to tell if you can run hardware acceleration and if it’s enabled is to go to your computer’s bios settings from the startup menu.
BIOS settings – Make sure hardware acceleration is enabled in your BIOS settings. The way to do this may vary a bit from system to system. You may need to press f10 or esc on startup. But with most (updated) Windows 10 computers you can access the BIOS settings by doing the following: type “advanced startup” in the Windows search bar; click on “change advanced startup uptions:” when it comes up. Click “Restart now”. After your computer restarts click on Troubleshoot.
Click advanced options >firmware settings, then restart to change EUFI firmware settings. Wait for the restart then select the menu option for bios settings. With Intel processors the steps will be as follows or similar:
Press the right arrow to go to the Configuration tab. Arrow down to Intel Virtual/Virtualizaion Technology and turn it on (should say Enabled).
Exit and save changes.
If Virtual Technology was previously disabled in your bios settings You will need to run the intelhaxm-android.exe file now to install haxm.
Try restarting Android Studio and running your emulator again. If it’s still not working, restart your computer and try again, it should work.
NOTE: if you have Windows Hyper-V turned on this will cause you to not be able to run haxm. If you are having an issue with Hyper-V, make sure it is turned off in your settings: search in the Windows bar for “hyper”; the search result should take you to “Turn Windows features on or off”. Then make sure all the Hyper-V boxes are unchecked.
One more possible reason: you installed HAXM and then updated BIOS settings by disabling virtualization. Or, updated BIOS version. Please check BIOS settings again, and be sure virtualization enabled.
I had the same issue. In my case I found two issues causing the problem
I had Hyper-V running, I think if any Virtualization programs running you need to uninstall
I was running under Standard Account / Not Administrator
Open Android SDK manager,"intelhaxm-86 emulator" install that
Windows Users Only
This is a bit late but just figured that some answers are to go to the bios settings but for me, I was able to resolve this by just disabling the hyper-v feature. We do this by following these steps:
You should install the intel hardware acceleration first on sdk manager than you can start to create your virtual device on AVD manager
Enable virtualization Technology
This is worked in my case
Restart Computer
Continuously press Esc and then F10 to enter BIOS setup
configuration
Check Virtualization technology
My PC is HP Zbook
1. Boot the unit to BIOS (Reboot the unit and keep tapping on F10).
Navigate to Advanced>Device or System Configuration> Click on the check box Virtualization Technology (VTx) and Virtualization Technology for Directed I/O (VTd)
Save changes and Exit.
For me the following solution worked:
1] Going to BIOS setting and enabling Virtualization.
This steps worked on Mint 17.2 Rafaela:
Open a terminal and input this: sudo apt-get install qemu-kvm
Restart your pc and enable virtualization technology on your BIOS setup
In terminal again, insert this: sudo kvm-ok
In the android sdk manager it says that it has hardware accelerator already installed but I think it is only downloaded not installed.I just manually installed the intelhaxm-android.exe and it worked for me.
plus I had docker installed , there were some answers to disable Hyper-V features, therefore I did that too, but not sure whether it helped or not.
I experienced the same issue, but after turning off Hyper-V and enabling VT-x on my BIOS I still couldn't install the intelhaxm-android.exe program.
To fix my issue I had to turn off Windows defender Memory integrity
check here for steps -> https://github.com/intel/haxm/issues/105
I had the same issue even when hardware acceleration installed. My solutions was uninstalling and reinstalling it using SDK Manager. Make sure you restart the Android studio after then.
I already had HAXM installed, but it was an older version. Then I updated from SDK manager, then emulator worked!
This answer works for latest update on Windows 10 version 1709. Not tried with other version. But i hope it'll work.
I also ran into similar issue in my windows 10 system. I disabled Hyper-V and I tried all the answers posted here. But after that also i faced the same issue. So after lot of try, made it work using an documentation available in haxm manual. The document menntioned to use a tool named Device Guard and Credential Guard hardware readiness tool provided by Microsoft to disable Hyper-V along with some other features(Remember not only Hyper-V. So little cautios) completely. Follow the below steps to do that.
Download the latest version of the tool from here.
Unzip.
Open an elevated (i.e. Run as administrator) Command Prompt and run the below command by changing the extrated path and the respective version number.
#powershell -ExecutionPolicy RemoteSigned -Command "X:\path\to\dgreadiness_v3.6\DG_Readiness_Tool_v3.6.ps1 -Disable"
Reboot.
Then if you try to install intel haxm, it'll work.
In case of latest update check the docs available in official intel haxm development link.
Hope it helps someone.
For those who still have problems with this, you can try using an alternative Android emulator such as Genymotion.
I'm using Ryzen 5 processor with latest Windows 10 update installed (1809), but still can't install HAXM. So, what I did to resolve this was:
Enable Hardware Virtualization in BIOS settings
Enable Hypervisor Platform in Windows Feature
Install Genymotion with Virtual Box -- select for personal use
Install Genymotion Android Studio plugin -- find this in Android Studio plugins settings
You're good to go from here.
I'm kinda a beginner to Android Studio and I couldn't find a solution for this problem. I've always used Android Studio on my MacBook, but now I needed to use it in my PC. The problem is, when I try to run the emulator, it tells that I need to enable VT-x. I enabled it from my BIOS settings, but I also needed to enable it from control panel in system functions. The problem is that, reading around, I've found that Hyper-v function can be enabled only in Windows 10 Pro version, while I own a Home version. Now, I can't use Android Studio Emulator in my PC only cause I don't own Windows 10 Pro? That sounds kinda weird to me...
Some help would be really appreciated.
Android Studio Emulator runs on Windows 10 Home. In my case, HAXM was installed but only partially because virtualization was not enabled.
For HAXM to install correctly, Virtualization must be enabled on the Intel CPU and this can be done through the UEFI bios settings. It is normally disabled by default, so if this has not been specifically enabled it will probably still be disabled and HAXM installation will not finish installing.
You can download a cpu utility such as Speccy to see if the Virtualization status is enabled or disabled and then re-install HAXM after Virtualization is enabled. Android Studio Emulator should then run on Windows 10 Home without problems.
I am using Dell Inspiron 5521R system to install android development studio. I am getting an error "VT-x is not enabled" while during haxm installation. I checked in bios, there is VT-X option is not showing. Only virtualization option is there and it is enabled already. I also checked Hyper-V option in control panel and this one is also unchecked. but the problem is same as earlier.
I'm assuming you want this for the Android emulator to work properly.
Not really a solution as I tried a many things myself, but an alternative to the Android emulator is Genymotion. It worked for me where I never got Hyper-V to work.
I suggest Genymotion, it is faster, smoother than default Android Studio Emulators
Install Genymotion
Install Genymotion Plugin For Android Studio
Run Genymotion & click Red Button in the Android Studio (Which will appear after you install Genymotion Plugin for Android Studio)
Enjoy Developing
I'm trying to install Android Studio, but it's showing this error.
Is there a solution for this problem?
As #Marcin Koziński said in Intel, HAXM requires only to run the Emulator faster. Still, if you want to install HAXM, follow the steps.
Restart your PC and go to BIOS
In advanced option, Enable Virtualization and save exit
After Windows restarted, go to the SDK path of your Android Studio
Find this path \sdk\extras\intel\Hardware_Accelerated_Execution_Manager
Run intelhaxm-android.exe executable
Now, this would install HAXM software in your system. Note that your system must have Intel CPU, not AMD
Ignore this error on Android Studio installation and go to the Intel website, download the HAXM installer that they provide (instead of using the one downloaded through Android Studio).
Here's the link:
https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
and the direct link:
https://github.com/intel/haxm/releases/tag/v7.6.1
Try this :
Go to Control Panel → Program and Feature. Click on Turn Window Features on and off. Uncheck Hyper-V option and restart your system.
Now you should install HAXM with no error
Enable virtualization in your bios ( found under the cpu performance ) …then disable hypervisor and also unchecked virtual machine platform ( mostly on win 10 and win 11)
Restart your machine
Good to gooo!!
I was also facing the same issue, however i have tried below steps which worked for me.
Instead of installing HAXM from android studio, download it from
here HAXM
From - Downloads section, you can download MAC or WINDOWS release.
Install it from IntelHaxm-android file
Note - Same kind of steps we can follow for Mac.
Go to android studio SDK Manager select SDK tools and search for Intel x86 Emulator Accelerator(HAXM Installer) and install it. This should solve the problem.
I disabled tamper protection and core isolation in windows defender and it solved the issue.
If you are using Windows 10, then, be sure to disable "Windows Defender Credential Guard".
Reference: https://learn.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-manage
In my case, in the Window features on or off, I uncheck both the "Windows Hypervisor Platform" and "Virtual Machine Platform". After restart, the Android Studio, SDK Manager, Android SDK, SDK Tools, Intel x86 Emulator Accelerator 7.6.5 can then successfully be installed. Just uncheck the "Windows Hypervisor Platform" is not enough. My Android Studio is 4.1.3 and my Windows 10 OS build is 19041.867
Go to Control Panel → Program and Feature. Click on Turn Windows Features on and off. Uncheck Hyper-V and Windows Sandbox option and restart your system.
I enabled Virtualization in my BIOS and the installation worked, i have intel I5 CPU
Enabling Virtualization in BIOS solved the issue for me. If you have an Intel processor, you need to enable VMX in the CPU configuration file. Here is an detailed article with the steps (for asus motherboards). https://www.asus.com/support/FAQ/1043786/
I wrote a perfect documentation for that. The key is to download the HAXM driver but don't close the Android installation window after it's downloaded. You need to find it's path and run the installer .bat through Powershell or CMD. Simply follow along the mentioned guideline I wrote and you will be finde. Cheers!
If you're running on a macbook pro laptop, make sure to reboot to windows without pressing the option key for boot selection. As this will disable virtualization .
To soft reboot to windows
Soft reboot via the Apple menu i.e. top left Apple icon => restart. During bootup select Windows/Bootcamp (via the option key). My Windows was Bitlocker encrypted, so I entered the disk password, booted to Windows, entered Windows password, landed on Windows 10 desktop. This time Hyper-V was present and functional!
if the error still persists. Ignore the Android Studio installation error
Disable the Hyper-V Manager
Hyper-V is another Virtualisation env. just like Intel HAXM.
You cannot use both at the same time. Hence, It is necessary to Disable Hyper-V.
You can follow these steps to disable Hyper-V
Go to Control Panel -> Programs and Features -> Turn Windows features on or off
From the window disable Hyper-V options
Reboot your machine
or on cmd prompt with admin priveledges:
bcdedit /set hypervisorlaunchtype off
Go to the Intel website, download the HAXM installer that they provide (instead of using the one downloaded through Android Studio).
Here's the link: https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
and the direct link: https://github.com/intel/haxm/releases/tag/v7.6.1
Open BIOS setting of your PC/Laptop.
Goto Advance -> Device Configuation.
Enable VTx(Virtualization Technology).
and Try to install HAXM.
Hope this will work.
IF u have AMD CPU you have to install Driver for AMD processor(It's in SDK Tools options menu.) then go to C:\Users\YOURNAMEHERE\AppData\Local\Android\Sdk\extras\google\Android_Emulator_Hypervisor_Driver and run silent_install.bat. If it doesn't work try cloning your emulator device instead creating new one. Also, you might have to set SDK root home folder as a new variable.
when you press +creating virtual device and selcting device on the right side of it shows you HAXM installation or something ,you can check there.
I tried several times to install the HAXM but all in vain. Finally i came to an end and watched this video. This video creator is awesome and have provided the exact solution i needed to.
Here's the video link: https://www.youtube.com/watch?v=7_Ny7-y6TRA&t=113s
And
From this link you can download the software for your device.
https://github.com/intel/haxm/releases
I hope it'll help you as it does mine :)
Have tried some solutions stated above, sadly it did not work for me.
Just noticed that when I install HAXM it uninstall HAXM after installing, so what I did was after the installation even gets finished (before setting how much RAM to give it) I went to the SDK folder on %appdata% then copied the folder from Hardware_Accelerated_Execution_Manager which can be seen on extras folder then I exit android studio then paste the folder on extras/intel then it worked :D
This worked for me :
If you already disabled completely Hyper-V and it's still not working disable also:
Windows Hypervisor Platform
"The Windows Hypervisor platform is an API that third-party developers can use in order to use Hyper-V."
Ofcourse you're CPU need to be intel based and also you need to turn on Virtualization options in BIOS.
Hope it helps if not I wish you a lot of luck.
I'm adding here the official Release Notes of the HAXM.
This is not a solution answer but it will complete the solutions already mentioned in terms of requirements and known issues:
Prerequisites
Intel(R) HAXM requires the Android SDK to be installed
(version 17 or higher). For best performance, using SDK version 20 or
higher is recommended.
System Requirements
---------------------------- Hardware Requirements:
Intel(R) processor with support for VT-x, EM64T, and Execute Disable Bit
At least 1GB of available RAM
Supported Operating Systems:
Windows* 10 (64-bit)
Windows* 8.1 (64-bit)
Windows* 8 (64-bit)
Windows* 7 (64-bit)
macOS* 10.12, 10.13, 10.14
Note:
Test was NOT conducted on Windows* XP since Microsoft* will not offer support for this version.
Test was NOT conducted on 32-bit Windows since Android Emulator only supports 64-bit Windows.
Important:
Intel HAXM cannot be used on systems without an Intel processor, or an Intel processor lacking the hardware features, described in the
"Hardware Requirements" section above. To determine the capabilities
of your Intel processor, please visit http://ark.intel.com/
Intel HAXM can only accelerate Android x86 and x86_64 system images for Android Emulator. These system images as well as Android Emulator
can be installed using Android SDK Manager.
Known Issues:
HAXM driver does not support emulating a 64-bit system image on Intel systems based on Core microarchitecture (Core, Core 2 Duo etc.).
All systems based on Nehalem and beyond are supported (Core i3, Core
i5 and Core i7 machines).
QEMU or Android Emulator will fail to launch if the guest RAM size (specified with the -m option for QEMU or -memory for Android
Emulator) exceeds 4095MB.
If the guest RAM size (specified with the -memory option for Android Emulator) exceeds 3583MB, Android will either fail to boot or report
the total memory as 3.0GB.
If DriverVerifier is running on a Windows System on which HAXM is installed BSOD can happen during HAXM uninstall. Check the following
link for more information from Microsoft.
http://msdn.microsoft.com/en-us/library/windows/hardware/ff545448(v=vs.85).aspx
On Windows platform using sc query command on command line will show the driver to be in Running state even if VT is disabled in BIOS. The
Android SDK gets this information from HAXM driver whether VT is
enabled or not and displays it to user when the user starts to emulate
a device. The information in the SDK is the most accurate information
for the state of the HAXM driver.
On Windows 8, 8.1 and 10, it is recommended to disable Hyper-V from Windows Features in order for the HAXM driver to properly function.
On Windows, Avast Antivirus may interfere with HAXM and cause Android Emulator or QEMU to run very slowly. A workaround is to
uncheck "Use nested virtualization where available" in Avast Settings
If all these options stated above did not work, then I recommend you go to the BIOS settings of your PC and enable virtualization mode.
My laptop is HP x360. I had to enable virtualization in BIOS( use f10)
Then do this step https://github.com/intel/haxm/issues/105#issuecomment-470296375
if memory integrity is off inside core isolation. Switch it on.
If you get an incompatible driver error when you switch on above feature, then find and uninstall/delete it.
In my case, Tencent's gaming buddy was the driver.
In some systems, the windows feature Hyper-V is not listed. instead, it is "Windows Hypervisor Platform" <- Uncheck this.
These all may take multiple restarts.
Then finally try installing HAXM from android studio.
It should work.
As fabio-roveroto ignore this error because HAXM is used for Android Emulator.
If you want to use Android Emulator you must install HAXM please follow these steps in the below link for fixing the error:
https://support.bluestacks.com/hc/en-us/articles/115003174386?utm_campaign=bgp_product&utm_medium=app_player&utm_source=support
And If you can't find UEFI Firmware Settings in the Advanced options, please check that your PC BIOS mode is Legacy or UEFI from this link, If your BIOS mode is Legacy
check this link to convert Legacy to UEFI.