Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple Silicon Android Studio emulator: ERROR: can't find the emulator executable

I just installed Android Studio 4.2.2 and Android Studio Preview (Arctic Fox Beta 5) to my Apple M1 Macbook.

When creating an emulator (arm64) I immediately receive the error:

AVD Manager: The emulator process for AVD Pixel_4a_API_30 has terminated

I then went to the log file of Android Studio (Help > Show log in Finder) and I see that the error occurs when Android Studio attempts to run the following:

~/Library/Android/sdk/emulator/emulator -netdelay none -netspeed full -no-snapshot-load -avd Pixel_4a_API_30

which outputs:

emulator: Android emulator version 30.3.5.0 (build_id 7036990) (CL:N/A)
emulator: ERROR: can't find the emulator executable.

Tried every possible solution I found online so far...

like image 844
Scaraux Avatar asked Jul 08 '21 18:07

Scaraux


1 Answers

I had the same issue and found a simple solution after reading the README from the m1 emulator GitHub page.

If I'm right, what is happening is that you're trying to boot an image built for a different architecture. When selecting the image, you need to switch to the "Other Images" tab and look for an image with arm64-* stated in the ABI column. Everything else should work after.

Solution Steps

  1. Open the AVD Manager and and click + Create Virtual Device
  2. Select a device you want and click Next
  3. Switch the tab to "Other Images" Android Studio Select Arm64 Virtual Device Image
  4. Finish the creation process and run your app.
like image 95
Alexandr Sarioglo Avatar answered Sep 18 '22 07:09

Alexandr Sarioglo