Android Studio/Emulator on macOS with ARM CPU M1

AndroidMacosAndroid EmulatorHardware AccelerationMacos Big-Sur

Android Problem Overview


I started Android Studio 4.1 in macOS Big Sure 11.0.1 with new ARM cpu M1

After installing Rosetta: Yes, it builds !

But the Emulator has problems, it shows me CPU does not support VT-x

Even ARM images have this issue enter image description here

I used the most recent, a very old api25 (Google has to do here something) but it's increadible slow

How to make the Emulator work and fast ?

Android Solutions


Solution 1 - Android

Good news !

Edit on 28th July 2021  

> Apple Silicon Support

Now, there is an arm64 release version available for Android Studio Arctic Fox (2020.3.1) You can download it here https://developer.android.com/studio#downloads

Use a arm64-v8a image !

  • Tools -> SDK Manager
  • Install Android 11 (R) or 12.0 (S) and click Apply
  • Tools -> AVD Manager -> click Create Virtual Device
  • Choose any device that has the Play button and click Next
  • Choose an arm64-v8a on "Other Images" tab

Android studio

End of beta ! Thank you

Edit on May 2021  

> Apple Silicon Support

There is an arm64 version available for Android Studio Arctic Fox (2020.3.1) Canary 15 ... RC01 You can download it here https://developer.android.com/studio/archive

Android studio

Edit on 4th Feb 2021

Now audio in and out works properly https://github.com/741g/android-emulator-m1-preview/issues/10#issuecomment-773532762

Solution 2 - Android

This fixed my issue

Tools -> SDK Manager -> SDK Tools (tab) -> Deselect 'Android Emulator' -> OK

Now, when you try to run your app, or launch device from AVD Manager, it will give the 'Install Emulator' error -> Click Ok. This will automatically download the correct version.

Solution 3 - Android

I followed the steps that this guy talks and had good results: https://medium.com/mobile-app-development-publication/my-journey-to-setup-android-emulator-for-m1-macbook-pro-b8365321b3e7

  • Go to AVD Manager
  • Click "+ Create Virtual Device"
  • Choose a Device definition (ex. "Pixel 4a XL")
  • Click "Next"
  • Click "Other images"
  • Download "S" System image
  • Click "Next"
  • Click "Finish"

Solution 4 - Android

Steps to run your Android APP on M1

Finally my Android APP running normally on my M1 chip !

This presume you already have your environment variables set.

  1. Download Android Studio Arctic Fox (2020.3.1) Link (I personally got the last I could September 1, 2021)

  2. Install and open Android Studio

  3. Tools -> SDK Manager

  4. Check the box of Android 12.0 (S) and click Apply

    ... Wait until it's downloaded

  5. Tools -> AVD Manager -> click Create Virtual Device

  6. Choose any device that has the Play button and click Next

  7. Choose the image S. If you can't find it in the Recommended tab click on Other Images

  8. Final step click Next and Finish

You should now be ready to go.

Solution 5 - Android

I've had this problem with my new Macbook Pro M1 Pro (Macbook Pro 2021 14 Inch M1 Pro). after some digging around, the root of the problem was that I have transferred all my data from my old Mac (using Time Machine) which uses Intel (The other Mac is Macbook Pro 2011 13 Inch Intel), so other than a lot of apps which did not run or ran sluggishly and I had to reinstall their ARM version, the Android SDK Tools were transfered too.

So here are the simple steps to the solution:

  1. Launch Android Studio
  2. Select SDK Managerenter image description here
  3. Go to SDK Tools tabenter image description here
  4. Untick All the Packages, and keep them in your mind because you will retick them in the next step
  5. You will have a dialog something like this, Select Apply. This way now you've uninstalled the old packages enter image description here
  6. retick all packages (to reinstall their ARM version) and click apply, this may take some time depending on your internet speed as you are reinstalling all the packages
  7. Try launching the emulator now, if the problem is not fixed, try restarting Android Studio or your laptop completely, My problem was fixed without restarting though

Solution 6 - Android

If everything fails try this:

On Android Studio uncheck emulator -> tools -> Launch in a tool window

enter image description here

Got this from this official issue thread (by jeanlst):

https://github.com/google/android-emulator-m1-preview/issues/76#issuecomment-1023563846

Solution 7 - Android

You can now download the Android Studio Canary. In which you can run the android emulator with out any limitation of the android emulator m1 preview. In android emulator m1 preview there are issues with webview , device skin, sound etc..now you dont have to worry about that

Here is the link

https://developer.android.com/studio/preview?gclid=CjwKCAjwm7mEBhBsEiwA_of-TKIWfjv-MVe5W1Za_KcooZ-vfZ3vG_IkUyK40E-x10JLRRgnGjBCDBoCMOgQAvD_BwE&gclsrc=aw.ds

Solution 8 - Android

After I install the latest AndroidStudioPreview for Mac M1, it already included a default simulator with arm64-v8a ABI. However, this simulator still not loaded by AndroidStudio

When I tried to run adb from Terminal, it shows adb: command not found. So I config the adb

  • I set adb environment variable follow this answer

  • After that, when I run adb, I get the error zsh: bad CPU type in executable

  • Then I fix it by softwareupdate --install-rosetta (follow this answer)

  • Restart Terminal, then adb command working well

  • Restart AndroidStudio, then it able to see and run app to simulator

Solution 9 - Android

Now It's available

> Apple Silicon Support

Android Studio Arctic Fox Canary 15 contains preliminary support for Apple Silicon (arm64). This version of Android Studio for this platform is still under active development, but we wanted to get a functional version out to the app developer community to get feedback. On top of the Intellij build, design tools work, and the Android Emulator works with API 30 and API S Developer Preview emulator system images.

Click here to Download

Solution 10 - Android

For me I can run the emulator on my MacBook Pro MacOS Big Sur with ARM CPU M1 only on Android Studio Arctic Fox (2020.3.1 Beta03 and later versions) only after deleting Intel x86 Emulator Accelerator (HAXM installer).

Solution 11 - Android

It is not clear exactly what problems Google has had that they still have no way to release the M1 version. I got the DTK M1 almost a year ago. I think Google got it even earlier. Yes, there was a problem with emulation, but everything else in the IDE could definitely be done.

At least a loner did it without too much trouble. There is roughness, but the speed of work is different from sky and earth. Working with a regular Android Studio on M1 is almost impossible, and even with this refinement amateur, everything flies like lighting.

Here is the link: https://github.com/dsa28s/android-studio-apple-m1

This is an unofficial canary version of Android Studio Arctic Fox with emulators on the Apple Silicon. I'm using it and it works well in most cases.

Solution 12 - Android

This works for me with Android Studio 2020.3.1:

  1. Tools -> AVD Manager -> click Create Virtual Device
  2. Pick any one of the Hardware that has Play Store, e.g. Pixel 4
  3. Click Other Images tab, download and select the S API Level
  4. Click Next and Finish

Then you're good to go!

I don't have any issue so far with the performance of my emulator which is nice.

Source/Credit to author of: https://medium.com/mobile-app-development-publication/my-journey-to-setup-android-emulator-for-m1-macbook-pro-b8365321b3e7

Solution 13 - Android

Android Studio now has an official production release that supports the ARM chip. 2020.3.1.26

Solution 14 - Android

For me none of the solutions worked. Tried Arctic fox, bumblebee and etc. The only thing that worked was the Dolphin canary version. As you install this version, it gives you a default emulator but it's also possible to create a new one without any issue. Of course, there could be issues (because its canary ver.) but I'm happy that I can run something at this point.

Solution 15 - Android

In the emulator window (when all emulator tabs are closed) click on "Update" link and update developer tools.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionhannes achView Question on Stackoverflow
Solution 1 - Androidhannes achView Answer on Stackoverflow
Solution 2 - AndroidDipanker ShahView Answer on Stackoverflow
Solution 3 - AndroidFlavia CohenView Answer on Stackoverflow
Solution 4 - AndroidcrgView Answer on Stackoverflow
Solution 5 - AndroidAdnanView Answer on Stackoverflow
Solution 6 - AndroidRenato ProbstView Answer on Stackoverflow
Solution 7 - AndroidSabiq ThottolyView Answer on Stackoverflow
Solution 8 - AndroidLinhView Answer on Stackoverflow
Solution 9 - AndroidPrasathView Answer on Stackoverflow
Solution 10 - AndroidВалентин ФалинView Answer on Stackoverflow
Solution 11 - AndroidDzmitry SotnikovView Answer on Stackoverflow
Solution 12 - AndroidJiyehView Answer on Stackoverflow
Solution 13 - AndroidmonchisanView Answer on Stackoverflow
Solution 14 - AndroidHoonView Answer on Stackoverflow
Solution 15 - Androidtatiana_cView Answer on Stackoverflow