Android Studio/Emulator on macOS with ARM CPU M1
android, android-emulator, hardware-acceleration, macos, macos-big-sur
Solution
Good news !
Edit on 28th of July 2021
Apple Silicon M1 Support
Now, there is an arm64 release version available for Android Studio Arctic Fox (2020.3.1) You can download it from here https://developer.android.com/studio#downloads
Easy fix to use right architecture
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.
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 Google Play Store icon and click Next
- Choose an arm64-v8a on "Other Images" tab
When NDK runs into `Unknown host CPU architecture: arm64` you can solve it here
`kapt` doesn't work Solution https://stackoverflow.com/a/68285501/1079990
Problem
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 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 ?
Related problems
- Error about Android Studio on Macbook M1: An error occurred while trying to compute required packages
- Not able to access adb in OS X through Terminal, "command not found"
- InvocationTargetException with Android Arctic Fox | 2020.3.1 arm64 on M1 Apple silicon
- Android NDK Apple SiliconM1 run into: Unknown host CPU architecture arm64