- CPU: 11th Gen Intel Core i7 11800@2.30 GHz
- RAM: 32GB
- Operating System: Windows 11
-
Install Node.js: React Native requires Node.js to function.
-
Java Development Kit (JDK): React Native requires the JDK.
Note: It's recommended to use Node 16 or newer for Node. Using JDK versions higher than 11 may cause issues.
-
Install Android Studio from the official website.
- Ensure you've checked "Android SDK" and "Android Virtual Device" during the installation process.
-
Set Environment Variable:
- Add
ANDROID_HOME
to environment variables (this should be the path to your Android SDK). - Add
platform-tools
to PATH.
- Add
- In your terminal or command prompt, navigate to your desired directory.
- Install npm using
npm install
. - Initialize your app with
npx react-native@latest init TodoListApp
.
- In Android Studio, under "more actions," select "Virtual Device Manager".
- Click on "Create Device". Choose your preferred phone device and click "Next".
- Select your desired system image.
- In Android Studio, click the "Open" option and select the
android
folder of your project. - Click on "Make Project" under the "Build" option.
- Once the project has built successfully, click on "Run" and choose your desired device.
-
Issues with Metro Bundler:
- Clear cache using
npx react-native start --reset-cache
.
- Clear cache using
-
Encountering Build Errors:
- Validate the
ANDROID_HOME
setting. - Delete the
node_modules
folder andpackage-lock.json
, then runnpm install
.
- Validate the