Run Android Emulator On Mac
I am in the process of building some mobile apps for one of my clients, and while I'm pretty familiar with running the iPhone simulator and building iPhone apps, I'm pretty new to the Android development tools at this point. So I thought I would give a quick and easy guide for folks to follow, that might be interested in getting started with Android Development and running the Android Emulator.
I should mention that there is also an Eclipse Plugin for Android Development as well that you can use instead. Also, I'm using a Mac, but I think the steps should be pretty close if you are running Windows or Linux.
Bluestacks Download on Mac. The latest version of Bluestacks is also available on Mac devices. It is a helpful service for users who love to connect. The Android emulator can run effectively on Mac devices. The Bluestacks application works with all popular Android apps. The Mac devices are very capable of running lightweight Android apps. With this, you can easily. Run Android apps on Mac. It also has other features, like recording gameplay, customizing controls, etc. This an Emulator that will run your games perfectly. It is a free Android emulator and you get multiple gaming controls. This was our article on the Best Android Emulators For MAC OS X. We hope you found it.
Step 1 - Download the Android SDK
Download the Android SDK, and unzip it somewhere. I placed the android-sdk-mac_86
folder in my /Applications/
folder, but you can put it wherever you want.
Step 2 - Optional Add to System Path
Since we are using the command line you might find it useful to add the android-sdk-platform/tools
folder to your system path so you can run the android commands from any folder.
Step 3 - Install Android Platforms
At this point, I tried running the emulator
command, but the SDK doesn't contain any Android Platforms, the Android platform is essentially Android OS, you need to install at least one version (eg 1.6, 2.1, 2.2, etc) to run the emulator.
To install platforms run the android
command located in the tools
folder of the SDK (use Terminal.app on a Mac, or the Command Prompt on Windows, Linux folks you know what to do :). This will pop up a window. Select Available Packages, pick some platform versions and install.
Step 4 - Create a Virtual Device
Still in the android
tool, click on Virtual Devices on the left, and then click New. Here's an example of the settings for the new device:
Once you create the avd file, it should show up in the listing of Android Virtual Devices:
Step 5 - Run the emulator
Now select the virtual device you just created and click Start on the right, and the emulator should start running:
The very first step to start development in React-Native is to install the right tools to setup the environment correctly. I’m working on MacOS Catalina and I already have Xcode 11 installed on my machine which is one of the pre-requisites to run the iOS App.
Install the following dependencies for React-Native:
NodeJS: https://nodejs.org/en/download/
The recommended way to install Node is using Homebrew from your Terminal:
Watchman: In react-native, Watchman watches the source code for any changes and rebuilds them.
Install XCode from App Store.
Cocoapods: This is the Dependency Manager for iOS & Mac projects.
This requires you to enter system password.
Install Visual Studio Code for Mac from here. You might face issues on Mac OS Catalina to run VS Code due to Notarization requirements. You can check out this post for more details.
Create the folder inside say your Documents folder on your Mac as below:
Open VS Code and open New Terminal and type the following command to create a new React-Native App:
Come back to the MyApp folder and run the below command to run your App in the iOS simulator:
This will install and launch the App in your iOS simulator. The first time might be very slow. It might be helpful to launch your simulator beforehand.
Running on Android:
Install the Android Studio from here, which will install the Android SDK and the required emulator. I’m using the Android 10 emulator for Pixel XL.
Open the MyApp folder in VS Code to make further changes.
Issues
Running the Android App causes issues while launching the Emulator. The error message is: React Native adb reverse ENOENT
Starting with macOS Catalina, your Mac uses zsh as the default login shell and interactive shell. You can make zsh the default in earlier versions of macOS as well.
So on your Mac:
1 – Open your .zshrc file:
2 – if .zshrc file doesn’t exist, you need to create one & open again(Step 1)
3 – Add this to your .zshrc file
4 – Save and close
5 – Compile your changes
& make sure to restart your terminal.
Run Android Emulator On Mac M1
Run the command in the Terminal and you’ll see something like below if everything is fine:
Android Debug Bridge version 1.0.41
Version 30.0.0-6374843
Installed as /Users/<username>/Library/Android/sdk/platform-tools/adb
You can also run the code in your VS Code Terminal and see the same output.
Mac Emulator For Windows 10
The path to Android SDK is available in the Configure button -> SDK Manager (at the bottom right) when you launch Android Studio.