[go: up one dir, main page]

0% found this document useful (0 votes)
6 views2 pages

React Native Setup

Uploaded by

Muhammad Qasim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

React Native Setup

Uploaded by

Muhammad Qasim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

React Native — Beginner Step-by-Step Setup

A short, clear step-by-step guide to get a React Native (React Native CLI) development
environment running.

1) Quick overview (what you'll do)

- Install prerequisites (Node, Java JDK, Android Studio, Xcode for iOS).

- Create a new React Native project with `npx react-native init`.

- Run the app on Android emulator/device or iOS Simulator/device.

2) Prerequisites

- Node.js (LTS) — install from nodejs.org.

- Java JDK (OpenJDK 11+ recommended for Android builds).

- Android Studio (with Android SDK, SDK Command-line Tools, and an emulator).

- Xcode (macOS only) + CocoaPods for iOS.

- Optional: Yarn, Watchman.

3) Install core tools

- Install Node.js from nodejs.org.

- (macOS) Install Homebrew, then CocoaPods via `brew install cocoapods` or `sudo gem install
cocoapods`.

- Install Java JDK (e.g., OpenJDK 17).

4) Android Studio & SDK setup

- Install SDK + Command-line Tools in Android Studio.

- Create an emulator (AVD).

- Set environment variables (ANDROID_HOME, PATH).

5) Create new React Native project

npx react-native init MyApp

cd MyApp

For iOS: run `npx pod-install ios`.

6) Run the app

- Start Metro: `npx react-native start`

- Android: `npx react-native run-android`

- iOS (macOS): `npx react-native run-ios`

7) Helpful commands

- `npx react-native doctor`


- `adb devices`

- `npx react-native start --reset-cache`

8) Troubleshooting

- Run `pod install` if iOS build fails.

- Fix Gradle/SDK issues via Android Studio SDK Manager.

- Ensure emulator/device is running and `adb devices` lists it.

9) Next steps

- Edit `App.js` to test hot reload.

- Learn RN basics (components, props, state).

You might also like