Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 319
hannes ach Avatar asked Nov 19 '20 07:11

hannes ach


People also ask

Can Mac M1 run Android emulator?

As of August 2022, there are no Android Emulators available for the Apple M1 chip Macbook to play Android games or run apps. If you have an older version of Mac or an Intel-powered Mac, you can try Bluestacks. Bluestacks is currently the best Android Emulator available on Mac.

Can Apple M1 run android studio?

The latest Canary build of Android Studio (15 as of writing this) brings initial native support for M1 Macs.

Does M1 Mac use ARM64?

The CPU uses the AArch64 or ARM64 extension set of the ARM architecture. Likewise, you are probably used to integrated GPUs as well, as they've been used in Intel and AMD chips for years. The GPU used in the Apple M1 has eight cores and takes up just a bit more space on the chip than the eight CPU cores.

Is M1 Mac x86 or ARM?

What's Different About the M1. Unlike Intel chips built on the x86 architecture, the Apple Silicon M1 uses an Arm-based architecture much like the A-series chips that Apple has been designing for iPhones and iPads for years now.


2 Answers

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

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

  • kapt doesn't work Solved https://stackoverflow.com/a/68285501/1079990

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

like image 103
hannes ach Avatar answered Sep 19 '22 21:09

hannes ach


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.

like image 38
Dipanker Shah Avatar answered Sep 21 '22 21:09

Dipanker Shah