This guide explains how to set up, build, and run the BabyNest mobile application locally on Android.
Before getting started, make sure you have installed and configured:
- Node.js and npm — to install dependencies and run the JavaScript tooling.
- JDK 17 — for the Android Gradle build.
- Android Studio — including the Android SDK and platform tools.
- Android SDK Platform 35 — required by the current project configuration.
- Android SDK Build-Tools — the version required by the project.
- Android device or emulator — to run the application.
Follow the official React Native environment setup guide and select React Native CLI → Android.
Clone the BabyNest repository and navigate to its root directory.
git clone https://github.com/AOSSIE-Org/BabyNest
cd BabyNestInstall the JavaScript dependencies from the Root directory:
npm installYou can run BabyNest on either a physical Android device or an emulator.
- Enable Developer options on your Android phone.
- Enable USB debugging.
- Connect your phone to your computer using a USB cable.
- Accept the USB debugging authorization prompt on your phone.
- Verify that your device is detected:
adb devicesYour device should appear with the status device.
If it appears as unauthorized, unlock your phone and accept the debugging prompt.
- Open Android Studio.
- Open Device Manager.
- Create or start an Android Virtual Device (AVD).
- Wait for the emulator to finish booting.
- Verify that it is detected:
adb devicesFrom the root directory, start Metro, the JavaScript bundler used by React Native:
npm startKeep this terminal running while developing and testing the application.
Open a second terminal in the root directory and run:
npm run androidThis command builds the Android application, installs it on the connected device or running emulator, and launches it.
On Windows PowerShell, you can build the debug APK directly:
cd android
.\gradlew.bat assembleDebugOn macOS or Linux:
cd android
./gradlew assembleDebugThe generated debug APK is normally located at:
android/app/build/outputs/apk/debug/app-debug.apk
To install the APK on a connected Android device:
adb install -r app/build/outputs/apk/debug/app-debug.apkRun the installation command from the android directory. Alternatively, run it from root using the full relative path:
adb install -r android/app/build/outputs/apk/debug/app-debug.apkBabyNest supports React Native Fast Refresh, which updates the application when you save changes to your JavaScript or TypeScript files.
If you need to reload the application manually:
- Android: Open the React Native Developer Menu using
Ctrl + Mon Windows/Linux, or shake the physical device if supported, then select Reload. - Metro: Press
rin the Metro terminal to request a reload.
If you modify native Android code or native dependencies, rebuild the application when necessary.
Check the USB connection and USB debugging settings, then run:
adb devicesIf necessary, restart the ADB server:
adb kill-server
adb start-server
adb devicesRun the Gradle build directly to see more detailed error messages:
cd android
.\gradlew.bat assembleDebug --stacktraceCheck that your JDK, Android SDK, Gradle configuration, and native dependencies match the project requirements.
Stop Metro and restart it with a cleared cache:
npm start -- --reset-cacheIf a previous Android build is causing problems, clean the Gradle build and rebuild:
cd android
.\gradlew.bat clean
.\gradlew.bat assembleDebugReturn to the root directory before running other npm commands.
Note: Avoid deleting dependency folders or lockfiles as a first troubleshooting step. Try clearing the relevant cache and rebuilding before changing dependency versions.
- React Native Documentation
- React Native Android Environment Setup
- Android Studio
- Android Debug Bridge (ADB)
Once these steps are complete, BabyNest should be ready to build and run on your Android device or emulator.