16

I try to build Android app from Android Studio.

I tried to install HAXM from Android Studio installer but I've an error:

enter image description here

Intel Virtualization Technology is already enabled in my BIOS. And the Hyper-V is already disabled on Windows 10.

Doc
  • 10,831
  • 3
  • 39
  • 63
pirmax
  • 2,054
  • 8
  • 36
  • 69
  • currently running it on ryzen 1600; which os are you on? Emulator launches under 1 second and runs fine – Doc Apr 05 '20 at 18:56

5 Answers5

19

For Ryzen on Windows 10, use the latest stable instead of canary.

  1. Enable virtualization in BIOS.
  2. Remove HAXM.
  3. Turn off Hyper-V, Windows Hypervisor platform, Windows Sandbox(depends on your windows version, old versions may not have all). REBOOT

screenshot

  1. Launch SDK Manager via Android Studio and you should see "Android Emulator Hypervisor Driver for AMD Processors". Check and click "Apply". The SDK Manager will download the installer package and unpack it to $ANDROID_SDK_ROOT\extras\google\Android_Emulator_Hypervisor_Driver. driver

Then,

  1. Open a Windows command console with administrator privileges.
  2. Go to $ANDROID_SDK_ROOT\extras\google\Android_Emulator_Hypervisor_Driver.
  3. Run silent_install.bat. Make sure you see the desired output from the installer: STATE: 4 RUNNINGresult
Doc
  • 10,831
  • 3
  • 39
  • 63
  • 1
    I have the exact steps working on Ryzen 1600 windows 10 1809 version. The system is stable and butter smooth. Perf is on par with an intel machine. – Doc Apr 05 '20 at 19:13
  • Thank you, your solution was the only one that worked for me. I have windows 10 1909 version and Ryzen 5 2400g, Android Studio 3.6.3! – Murillo Comino May 24 '20 at 00:40
  • no biggie, I use a one-line script to launch emulator. Launches under 2 sec, ready to go. Ryzen + android studio is great now. – Doc May 24 '20 at 10:12
  • and what if I am using windows home with no hyper-v available? – yeahman Jul 06 '20 at 07:40
  • @yeahman no problem. just make sure you have virtualization enabled in BIOS. Then install lastest version of Android Studio stable, get the stable version of emualtor. Install amd-hypervisior driver and you are good to go. – Doc Jul 06 '20 at 08:20
  • I tried everything and nothing worked, but running silent_install.bat worked for me. Android Studio 3.5. – Nfff3 Sep 16 '20 at 16:00
  • @Nfff3 upgrade to 4.0,driver installation is automatic. – Doc Sep 16 '20 at 16:47
  • Thanks a lot for the solution. Is there a command to output if it's running? – Nima Aug 14 '22 at 03:20
3

I just purchased a Ryzen 5 laptop with Vega 8 video and was having alot of problems running the Android Studio emulator; in the end the problem was resolved and it was very simple.

  1. Enable SVM or other virtual machine setting in the BIOS.

  2. Disable all hypervisor and virtual machine features by going to "Turn features on / off" in windows.

  3. Ensure you checkmark the AMD driver and uncheck HAXM in "SDK Tools" is SDK Manager.

    And most important:

    It is said that the latest update of Android Studio automatically installs the AMD driver once selected, however I found this not to be the case so the last step you need to do manually just to make sure.

  4. Run: C:\users\username\AppData\Local\Android\Sdk\extras\google\Android_Emulator_Hypervisor_Driver\silent_install.bat

Christos Lytras
  • 36,310
  • 4
  • 80
  • 113
dj_nexxus
  • 61
  • 3
3

Late to the party but if there are more like me who never got this to work, this got it to work: https://www.py4u.net/discuss/646511

If you tried everything (turning windows features off, enabling svm in bios..etc) and still didn't work, type bcdedit in the command prompt, and press ENTER. If you see an entry for hypervisorlaunchtype set to Auto, Hyper-V is still enabled. You can try setting the launch type to Off by running the command below.

bcdedit /set hypervisorlaunchtype off
HalSoul
  • 31
  • 3
  • I was following all the instructions everyone else had, but failed once I ran silent_install.bat, thanks so much this fixed it! Don't forget to restart for changes to take effect after running this command – Lucas Jun 13 '23 at 21:17
0

Use the Android Studio Cannary for this. I was with the even issue and it fix for me. Watch the video for help to configure it.

https://www.youtube.com/watch?v=57vZtl5l9hk

pablolucio
  • 35
  • 1
  • 1
  • 5
0

I am using AMD processor too and this happened to me like you. Before doing this, make sure to enable 'virtualization' on BIOS.

The solution was:

  1. Click the 'three dots' beside the triangle button of the emulator
  2. Find 'Show on Disk'
  3. Delete all data in the folder
  4. Go to Tools -> SDK Manager
  5. Click SDK Tools tab, and make sure 'Android Emulator', 'Android Emulator hypervisor driver', and 'Android SDK Platform-Tools' are clicked.
  6. Click apply/ok
  7. After it is done, click 'Create Device' on emulator.
  8. Choose Pixel 4 (or any if you want), but in my case, I chose Pixel 4
  9. Click next, and click tab 'Recommended', choose the lowest API (in my case is Nougat)
  10. Next, name it and finish.
  11. Now try click the triangle button of the emulator. It should work now (at least for me).