Apple M1 - Your CPU does not support VT-x

Viewed 1610

I tried everything and I am running out of ideas to have an Android simulator working on my mac.


Android Studio Bumblebee | 2021.1.1 Patch 3
Build #AI-211.7628.21.2111.8309675, built on March 16, 2022
  • I downloaded "the R API Level 30 image"

  • I installed "The Zulu OpenJDK" with

brew tap homebrew/cask-versions
brew install --cask zulu11

Edit: Following @mmBs advice, I changed the path to Gradle

Preferences > Build > Gradle > Gradle JDK > azul-11

gradle JDK

...same result.

I can't make the virtual device works on my machine.

enter image description here

I always have this device manager error when I try to launch the simulator.

enter image description here

Question:

How can I have an android simulator working with an Apple M1?

1 Answers

What works for me:

  1. Install Android Studio from the official webpage for M1 processors and then install Android SDK in default location ~/Library/Android/sdk.
  2. Install java using brew - brew install openjdk@11 (android supports java 11, no needs for installing java 17 etc.) and then add it to the path.
  3. Set your android paths in zsh or bash:
# Path to Android SDK
export ANDROID_HOME=/Users/$USER/Library/Android/sdk
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/ndk-bundle:$PATH"
  1. Install the emulator image for arm --> arm64-v8a (from Android Studio's Device Manager).
  2. Done - it should be working. I use M1 processor and the emulator works just fine. You don't need any m1-emulator-preview from github.

Edit: you can check this thread as well: Android Studio/Emulator on macOS with ARM CPU M1

Related