Android Emulator For M1 Macbook

  • In this video I'm setting up an Android development environment on the new Apple M1 MacBook Air with 16GB of RAM. VIDEO Apple M1 and Android Emulato.
  • Whether it is LG, Samsung, or Huawei, 90% of the mobile phones function on Android. Considering such tremendous growth in the mobile app development.

When Apple announced the new MacBook Air, MacBook Pro and Mac mini powered by the Apple M1 processor, there was a lot of tempered excitement.

Setting up the environment

Setup for iOS needs:

  • 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

Install Homebrew if you don't have it installed already

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

Add this to you Podfile

Two options:

  • 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 Emulator For M1 Macbook Mini

Links

I recently downloaded the Android Emulator that could run natively on an M1 Silicon Mac computer, when I installed the DMG file and ran it for the first time, I got the below error,

Android Emulator For M1 Macbook

I downloaded the dmg file from a know Github repo - Well this is common behavior on Apple macOS, where when you download an application setup from the internet, it blocks it for security reasons. now, how can I get pass through this warning and run the emulator!

Steps to fix this warning:
  1. Click on Cancel on the message,
  2. Now go to Apple Menu: System Preferences...
  3. Click on Security & Privacy,
  4. Go to Genrals Tab,
  5. Here you should see 'Allow apps downloaded from: 'Android Emulator' was blocked from use. because it is not from an identified developer.
  6. Click on the lock to Autenticate and make changes:
  7. Click on open Anyways
  8. You will again see a warning: Just click on Open button

You would see that the emulator window opens up, you will see a message to how to connect this emulator with Android Studio,

Could not automatically detect an ADB binary. Some emulator functionality will not work until a custom path to ADB is added. This can be done in Extended Controls (...) > Settings > General tab > 'Use detected ADB location'

Android Emulator cannot be opened error M1 mac
Android Emulator For M1 Macbook
Have Questions? Post them here!
Please enable JavaScript to view the comments powered by Disqus.
More Posts related to Android,
More Posts:
  • osascript wants to make changes while Android Studio Installation on Mac OS X - Mac-OS-X
  • How to check RAM details on Mac? - MacOS
  • Convert Java Array to ArrayList Code Example - Java
  • Fix SharePoint PowerShell error - The term Get-SPweb is not recognized as the name of a cmdlet function script file or operable program - SharePoint
  • say command macOS terminal examples - MacOS

Comments are closed.