Steps to run basic android app in MacBook .

STEP 1 : Install Android Studio

Android apps require Android Studio to run the app. We can download Android studio from here : https://developer.android.com/studio.

During installation, make sure to install Android SDK, Android Virtual Device (AVD) and Android Emulator. (accept all SDK licenses).

To add Android SDK to PATH, run the following command

After that add the following lines.

Now save it by using the following command

STEP 2 : Install Node.js (If it is not installed)

We can use Homebrew (Package manager for mac os) to install node. Run the following command in terminal to install Homebrew

After that run the following command

Now install Node.js using Homebrew using the following command

the above command will install node, npm and npx. We can check their versions with the following commands

STEP 3 : Install Java Development Kit (JDK)

React Native for Android needs Java Development Kit. We can install it using Homebrew. Run the following command to install JDK (java 17)

After installation, link it with the following command

Add JDK to shell command using the following command.

Now add these lines

Save it and Exit. after that run the following command to apply the changes.

Verify Java is setup correctly or not by using the following command

STEP 4 : Create a New React Native App :

Run the following command to create a new React Native App

Now navigate ‘SampleApp’ using the following command

Finally run the App using the following command