M1 Macbook Android Emulator

Setting up the environment

Setup for iOS needs:

  • @YaSi Did not face any issue running Android Studio on m1 Mac, I am able to download and run android studio, no forced stop of app face till now but sadly I only can code cannot run emulator:( The same goes for visual studio, it downloads and runs very smoothly –.
  • Feb 17, 2021 MacBooks with M1 can run Android apps with this software: What you need to know. If you're in need of running Android apps on a significantly bigger screen, the latest update from mobile gaming.
  • Three months with M1 Macbook Air as a mobile developer. Self taught flutter developer with more than 3 years of experience. Being a flutter developer almost for three years, I always had to use virtual machines on my windows laptop to test and run flutter applications on ios device. It was always a terrible experience.
  • Node (with NVM)
  • Watchman brew install watchman
  • Xcode (install from the App Store)
  • Xcode Command Line Tools xcode-select --install
  • Accept the Software License for Xcode sudo xcodebuild -license. It'll prompt you anyway when you run Xcode for the first time.
  • CocoaPods sudo gem install cocoapods

Homebrew

Android Emulator for M1. Who would have thought that Android Emulators would be a headache!?!?!! Rosetta 2 is amazing, but when it comes to the default Android Emulator it falls over because it can not run Kernel extensions and doesn't support VMs that are doing x8664 virtualization.

Install Homebrew if you don't have it installed already

Android on m1 mac

Node LTS with NVM

iOS

  • Open Terminal / iTerm with Rosetta (Get Info > Open using Rosetta)
  • Prefix the CocoaPods related commands with arch -x86_64

Android

  • Install JDK 8 brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
  • Install Android Studio
  • Install Android Emulator for M1

The Android Emulator doesn't work out of the box yet. Luckily, there is a Preview build by Google that supports Apple Silicon M1 chip based MacBooks. You'll have to download and install it separately. Most things work.

Troubleshooting

  • command not found for brew or nvm. Make sure you have a ~/.zshrc file. On a fresh new M1 MacBook, there is no ~/.zshrc or ~/.zprofile created and the $PATH doesn't get updated because of it. Create a ~/.zshrc file and run the commands to install Homebrew and NVM again.

Add this to you Podfile

Two options:

Nox player
  • Run on a different port react-native start --port=8088
  • OR find out what program is using 8081 sudo lsof -i :8081 and kill it kill -9 1234

incorrect architecture 'x86_64' errors

add this to the Podfile

run pod install afterwards

Android On M1 Mac

Links