How to Create, Build, and generate APK and AAB of the React Native Project.

Step 1: Init the react native project

choco install -y nodejs-lts microsoft-openjdk17
Picture credit (https://reactnative.dev/docs/environment-setup)
Pic Credit (https://reactnative.dev/docs/environment-setup)
Location on your computer \Android\Sdk\platform-tools
npx react-native@latest init NewProject

Step 2: Running on Emulator

npm run start 

Running on Physical Device

npm run start 
adb devices

Step 3: Generate APK File

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle 
gradlew assembleRelease 
yourProjectName/android/app/build/outputs

Step 4: Create the signed AAB file to be uploaded on play store

Leave a Reply