1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

skdmanagerでHAMXパッケージをインストールしているのに「CPU acceleration status: HAXM is not installed on this machine」のエラーになる。

Last updated at Posted at 2020-03-13

サマリ

  • sdkmanagerで「Intel x86 Emulator Accelerator (HAXM installer)」をインストールしているのにエラーとなる。

  • 原因はsdkmanagerでインストールした「Intel x86 Emulator Accelerator (HAXM installer)」はインストーラーがダウンロードされただけであり、インストールされていなかったこと。

  • 「Intel x86 Emulator Accelerator (HAXM installer)」をインストーラーでインストールを完了させれば解決した。

事象

AndroidSDKの仮想デバイス(ここではデバイス名がtest)を起動すると「CPU acceleration status: HAXM is not installed on this machine」のエラーとなる。

> emulator -avd test -port 5556
emulator: Requested console port 5556: Inferring adb port 5557.
emulator: ERROR: x86_64 emulation currently requires hardware acceleration!
Please ensure Windows Hypervisor Platform (WHPX) is properly installed and usable.
CPU acceleration status: HAXM is not installed on this machine
More info on configuring VM acceleration on Windows:
https://developer.android.com/studio/run/emulator-acceleration#vm-windows
If you are using an Intel CPU: please check that virtualization is enabled in the BIOS and that HAXM is installed and usable.
Note: if Hyper-V or Credential Guard is enabled, the emulator will not work with HAXM.
See https://github.com/intel/haxm/issues/105#issuecomment-470927735 for info on how to disable Credential Guard.
If you are using an AMD CPU or need to run alongside Hyper-V-based apps such as Docker, we recommend using Windows Hypervisor Platform.General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.

ただし、sdkmanagerで確認すると、HAXMパッケージはインストールされている。

> sdkmanager --list
Installed packages:=====================] 100% Computing updates...
  Path                                                 | Version | Description                                     | Location                            
  -------                                              | ------- | -------                                         | -------                                              
   :                                                       :           :                                                :
  extras;intel;Hardware_Accelerated_Execution_Manager  | 7.5.6   | Intel x86 Emulator Accelerator (HAXM installer) | extras\intel\Hardware_Accelerated_Execution_Manager\                 
   :                                                       :           :                                                :

その他確認したこと

avdmanagerで仮想デバイスの確認し、作成されていることは確認。

> avdmanager list target
Available Android targets:==============] 100% Fetch remote repository...
----------
id: 1 or "android-28"
     Name: Android API 28
     Type: Platform
     API level: 28
     Revision: 6

> avdmanager list avd
    Name: test
    Path: C:\Users\xxx\.android\avd\test.avd
  Target: Google APIs (Google Inc.)
          Based on: Android 7.1.1 (Nougat) Tag/ABI: google_apis/x86_64

結論

  • sdkmanagerでインストールしたつもりの「Intel x86 Emulator Accelerator (HAXM installer)」はexeのインストーラーがダウンロードされただけで、インストールまでは行われていなかった。

  • AndroidSDK配下にインストーラー「intelhaxm-android.exe」があるため、これをインストール。
    「C:\Android\android-sdk\extras\intel\Hardware_Accelerated_Execution_Manager
    image.png

インストール後に再度試すとエミュレーターは正常に起動した。

> emulator -avd test -port 5556
emulator: Requested console port 5556: Inferring adb port 5557.
ANGLE: D3D11: rx::Renderer11::generateConfigs
Failed to open /qemu.conf, err: 2
HAX is working and emulator runs in fast virt mode.
dsound: Could not initialize ADC
dsound: Could not create capture buffer
dsound: Reason: An undetermined error occurred inside the DirectSound subsystem
dsound: Could not initialize ADC
dsound: Could not create capture buffer
dsound: Reason: An undetermined error occurred inside the DirectSound subsystem
audio: Failed to create voice `goldfish_audio_in'
qemu-system-x86_64.exe: warning: opening audio input failed
dsound: Could not initialize ADC
dsound: Could not create capture buffer
dsound: Reason: An undetermined error occurred inside the DirectSound subsystem
dsound: Could not initialize ADC
dsound: Could not create capture buffer
dsound: Reason: An undetermined error occurred inside the DirectSound subsystem
audio: Failed to create voice `adc'
Your emulator is out of date, please update by launching Android Studio:
 - Start Android Studio
 - Select menu "Tools > Android > SDK Manager"
 - Click "SDK Tools" tab
 - Check "Android Emulator" checkbox
 - Click "OK"

参考にさせていただいたページ

Androidエミュレータが立ち上がらない ※参考というか答え※
https://deep-blog.jp/engineer/3721/

Androidエミュレーター(AVD)が起動せずに「Emulator: emulator: ERROR: x86 emulation currently requires hardware acceleration」とエラー表示された場合
https://www.javadrive.jp/android/emulator/index9.html

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?