Can't launch AVD on macOS 10.13

半城伤御伤魂 提交于 2019-12-20 10:59:13

问题


I created some AVDs in Android studio 3.0, but I can't launch them. I used the following command to launch them:

./emulator @Nexus_5X_API_17

logs:

emulator: WARNING: encryption is off
Hax is enabled
Hax ram_size 0x60000000
Failed to open vm 3
Failed to create HAX VM
No accelerator found.
failed to initialize HAX: Invalid argument

And when I reinstalled "Intel x86 Emulator Accelerator(HAXM installer)", the logs:

HAXM silent installation only supports macOS from 10.8 to 10.12 !

I don't know if it is related with this.

After that, I tried to install virtualBox to install genymotion, but I found when I clicks the virturalBox.dmg, the installer crashed.

Could you help me? thanks.


回答1:


Use the new Hypervisor.Framework support instead of HAXM on macOS, as described in the comments of the issue filed for this:

Try running the emulator on Canary channel 26.1.x (API 25/26 recommended) with Hypervisor.Framework; put the text "HVF = on" in ~/.android/advancedFeatures.ini (create this file if it doesn't exist already).




回答2:


You can download and install the 6.2.0 version haxm https://github.com/intel/haxm/releases/latest




回答3:


Following steps worked for me:

  1. Uninstall HAXM from android studio SDK manager (Tools->Android->SDK Manager->SDK Tools then uninstall 'Intel x86 Emulator Accelerator (HAXM)' by unchecking it.
  2. Download the HAXM version 6.2.1 zip file from Intel site https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager-end-user-license-agreement-macosx
  3. Install the .dmg file
  4. Restart your computer
  5. Open your AVD having x86_64 image and it should work.



回答4:


Go to your SDK installation directory, and manually run the HAXM installer. See step 4 on the page: https://developer.android.com/studio/run/emulator-acceleration.html#vm-mac

Technically HAXM is only officially supported up until MacOS 10.12 (Sierra) . Since MacOS 10.13 is still in beta, there may be a bug or incompatible API. If the wizard does no work, please file a bug here for the Android Emulator dev team to investigate further: https://source.android.com/source/report-bugs




回答5:


Go to Tools->Android->SDK Manager, then in the SDK tools search for Intel x86 Emulator Accelerator (HAXM installer) and update to the latest version, restart and thats all!




回答6:


On install/reinstall of HAXM you get:

HAXM silent installation only supports macOS from 10.8 to 10.12 !

From https://issuetracker.google.com/issues/62395878#comment44

in System Preferences > Security & Privacy > General, there was a message “System software from developer xxx was blocked from loading.” with an Allow button. Clicking the allow button enabled HAXM again




回答7:


I just redownloaded the simulator and it worked.



来源:https://stackoverflow.com/questions/44814815/cant-launch-avd-on-macos-10-13

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!