Environment setup

Environment setup

Windows System

Install Node.js

Download for Windows

Chocolatey

choco install -y nodejs-lts microsoft-openjdk11

Install Android Studio

Download and install Android Studio

Install the Android SDK

Android Studio installs the latest Android SDK by default. Building a React Native app with native code, however, requires the Android 12 (S) SDK in particular. Additional Android SDKs can be installed through the SDK Manager in Android Studio.

To do that, open Android Studio, click on "More Actions" button and select "SDK Manager".

The SDK Manager can also be found within the Android Studio "Preferences" dialog, under Appearance & BehaviorSystem SettingsAndroid SDK.

Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the Android 12 (S) entry, then make sure the following items are checked:

  • Android SDK Platform 31

  • Intel x86 Atom_64 System Image or Google APIs Intel x86 Atom System Image

Next, select the "SDK Tools" tab and check the box next to "Show Package Details" here as well. Look for and expand the Android SDK Build-Tools entry, then make sure that 31.0.0 is selected.

Finally, click "Apply" to download and install the Android SDK and related build tools.

Configure the ANDROID_HOME environment variable

  • Open the Windows Control Panel.

  • Click on User Accounts, then click User Accounts again

  • Click on Change my environment variables

  • Click on New... to create a new ANDROID_HOME user variable that points to the path to your Android SDK:

Add platform-tools to Path