A React Native application for tracking attendance, built with React Native CLI.
Before you begin, ensure you have the following installed on your machine:
- Node.js (LTS)
- npm package manager
- Android Studio (for Android development)
Follow the official React Native environment setup guide for your operating system:
React Native - Environment Setup
- Select "React Native CLI Quickstart" (not Expo Go)
- Choose your Development OS (Windows/macOS/Linux)
- Choose your Target OS (Android/iOS)
- Complete all installation steps including Java, Android Studio, and SDK setup
Before proceeding, verify that your environment is configured correctly:
-
Check ADB Connection:
adb devices
This should list your connected Android device or emulator.
-
Verify Android SDK Installation:
- Open Android Studio
- Go to Settings/Preferences → Appearance & Behavior → System Settings → Android SDK
- Ensure you have Android SDK Platform 33 (or newer) installed
- Verify Android SDK Build-Tools and Android Emulator are installed
-
Check NDK Version:
- In Android Studio, navigate to SDK Manager → SDK Tools tab
- Ensure NDK (Side by side) is installed
- Verify NDK version matches: 27.1.12297006
- You can also check in your project's
android/app/build.gradlefile
-
Configure Environment Variables:
- Ensure
ANDROID_HOMEis set correctly - Verify
PATHincludes Android SDK platform-tools and tools
- Ensure
-
Check Xcode Installation:
xcode-select --print-path
-
Install CocoaPods:
sudo gem install cocoapods
git clone <your-repository-url>
cd attendance-tracker-appInstall all required npm packages using the legacy peer dependencies flag to avoid conflicts:
npm install --legacy-peer-depsNote: The
--legacy-peer-depsflag is used to handle peer dependency conflicts that may arise with certain packages.
If you're developing for iOS, install the CocoaPods dependencies:
cd ios
pod install
cd ..Metro is the JavaScript bundler for React Native. Start it in a dedicated terminal:
npm startKeep this terminal window open and running.
Open a new terminal window in the project root directory and run:
npm run androidOr using Yarn:
yarn androidnpm run iosOr using Yarn:
yarn iosThe app should now launch on your Android emulator/device or iOS simulator.
- "SDK location not found": Ensure
ANDROID_HOMEenvironment variable is set correctly - "Unable to connect to ADB": Restart ADB with
adb kill-serverthenadb start-server - Build failures: Try cleaning the build with
cd android && ./gradlew clean && cd ..
- Port already in use: Kill the process using port 8081 or run
npm start -- --port=8082 - Cache issues: Clear Metro cache with
npm start -- --reset-cache
- Dependency conflicts: Delete
node_modulesandpackage-lock.json, then runnpm install --legacy-peer-depsagain - iOS build issues: Delete
ios/Podsandios/Podfile.lock, then runpod installagain
- Make changes to your code in your preferred editor
- For Android: Press
Rtwice orCmd/Ctrl + M→ "Reload" to see changes - For iOS: Press
Cmd + Rin the simulator to reload - Enable Fast Refresh for automatic reloading (usually enabled by default)
- React Native Documentation
- React Native Troubleshooting Guide
- Android Developer Documentation
- iOS Developer Documentation
Please read our contributing guidelines before submitting pull requests.
[Your License Here]
Happy Coding! 🚀