Android Studio/Emulator on macOS with ARM CPU M1

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 ?

9

17 Answers

Good news !

Edit on 28th of 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 from here

Use an 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

  • When NDK runs into Unknown host CPU architecture: arm64 you can solve it here

  • kapt doesn't work Solved

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

Android studio

Edit on 4th Feb 2021

Now audio in and out works properly

28

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.

3

I followed the steps that this guy talks and had good results:

  • 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"
2

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):

3

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
3

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.

1

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

2

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

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

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).

1

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:

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.

2

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:

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

2

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.

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

I ended up doing this Hack to manually install the emulator from the Dev Documentation

1. First, delete the android studio completely from your Mac system using the following command one by one:

rm -Rf /Applications/Android\ Studio.app rm -Rf ~/Library/Preferences/AndroidStudio* rm -Rf ~/Library/Preferences/com.google.android.* rm -Rf ~/Library/Preferences/com.android.* rm -Rf ~/Library/Application\ Support/AndroidStudio* rm -Rf ~/Library/Logs/AndroidStudio* rm -Rf ~/Library/Caches/AndroidStudio* rm -Rf ~/.AndroidStudio* rm -Rf ~/.gradle rm -Rf ~/.android rm -Rf ~/Library/Android* rm -Rf /usr/local/var/lib/android-sdk/ 

To delete all projects:

rm -Rf ~/AndroidStudioProjects 

2. Download the new Android studio using the below link:

3. Now install that software, create an emulator using arm version and open that emulator.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like