Before you begin, ensure you have met the following requirements:
- Node.js (v18 or newer): Download Node.js
- npm (v10.7 or newer): Download npm
- Java Development Kit (JDK) - v17: Download JDK
- Android development environment: See Setup Android Development Environment
For detailed instructions, refer to the React Native documentation.
- Install Android Studio: Download Android Studio
- Install Android SDK (v14 - UpsideDownCake - API level 34):
- Open Android Studio
- Go to
SDK Manager
- Install Android SDK version 14 (UpsideDownCake)
For more information, refer to the React Native documentation.
To run this React Native app, you'll need an Android device. You can use either a physical device or an Android Virtual Device (emulator).
-
Using a Physical Device
- Connect your Android device to your computer via USB.
- Enable Developer Options on your device:
- Go to Settings > About Phone.
- Tap Build Number seven times to enable Developer Options.
- Turn on USB Debugging:
- Go to Settings > Developer Options.
- Toggle on USB Debugging.
For more detailed instructions, visit the React Native documentation.
-
Using Emulator
-
Follow the steps below to set up an Android Virtual Device (AVD) emulator:
- Open Android Studio.
- Go to More Actions.
- Select Virtual Device Manager.
- Click on Create Virtual Device.
- Choose a device definition and click Next.
- Select a system image (recommended API Level 34) and click Next.
- Configure the AVD options and click Finish.
Once the emulator is set up, you can launch it and run your React Native app.
For more detailed instructions, visit the Android Developer documentation.
-
To run the application, follow these steps:
- Step 1: Install the dependencies by running
npm i --legacy-peer-deps
.
Note: Using
--legacy-peer-deps
to bypass peer dependency warnings.
- Step 2: Start the development server with
npm start
. (If you want to start with a clean cache, runnpm start -- --reset-cache
.) - Step 3: Open the application in Android by pressing 'a' (either in an emulator or on a physical device).
- Step 4: Once the terminal displays "Build Successful," the application is running.