React Native Cheat Sheet: Essential Commands for Development
- 공유 링크 만들기
- X
- 이메일
- 기타 앱
🔧 Basic Build & Run Commands
Command Description npx react-native run-android Run the Android app npx react-native run-ios Run the iOS app (Mac only) npx react-native start Start the Metro Bundler (Development server) npx react-native doctor Check environment setup and troubleshoot issues cd android && ./gradlew clean Clean the Android build cache npx react-native-clean-project Clear the entire project cache and builds
🔥 Debugging & Logs
Command Description npx react-native log-android View Android device logs npx react-native log-ios View iOS device logs adb reverse tcp:8081 tcp:8081 Connect the Metro server to a USB-connected Android device adb devices List all connected Android devices
📦 Package Management (npm / yarn)
Command Description npm install <package-name> Install a package npm uninstall <package-name> Uninstall a package npx react-native link <package-name> Link native modules npm update Update all packages to their latest versions
🚀 Release Build Commands (Android)
Command Description cd android && ./gradlew assembleRelease Build the Android release APK cd android && ./gradlew bundleRelease Build an AAB file for the Google Play Store npx jetify Migrate to AndroidX (maintain compatibility)
💡 Commands to Fix Common Issues
Bash# Clear cache and resolve build issues
rm -rf node_modules
npm cache clean --force
npm install
cd android && ./gradlew clean
# Reset iOS Simulator (Mac only)
xcrun simctl erase all
# Force reboot Android Emulator
adb reboot
🔧 Basic Build & Run Commands
| Command | Description |
| npx react-native run-android | Run the Android app |
| npx react-native run-ios | Run the iOS app (Mac only) |
| npx react-native start | Start the Metro Bundler (Development server) |
| npx react-native doctor | Check environment setup and troubleshoot issues |
| cd android && ./gradlew clean | Clean the Android build cache |
| npx react-native-clean-project | Clear the entire project cache and builds |
🔥 Debugging & Logs
| Command | Description |
| npx react-native log-android | View Android device logs |
| npx react-native log-ios | View iOS device logs |
| adb reverse tcp:8081 tcp:8081 | Connect the Metro server to a USB-connected Android device |
| adb devices | List all connected Android devices |
📦 Package Management (npm / yarn)
| Command | Description |
| npm install <package-name> | Install a package |
| npm uninstall <package-name> | Uninstall a package |
| npx react-native link <package-name> | Link native modules |
| npm update | Update all packages to their latest versions |
🚀 Release Build Commands (Android)
| Command | Description |
| cd android && ./gradlew assembleRelease | Build the Android release APK |
| cd android && ./gradlew bundleRelease | Build an AAB file for the Google Play Store |
| npx jetify | Migrate to AndroidX (maintain compatibility) |
💡 Commands to Fix Common Issues
Bash
# Clear cache and resolve build issues
rm -rf node_modules
npm cache clean --force
npm install
cd android && ./gradlew clean
# Reset iOS Simulator (Mac only)
xcrun simctl erase all
# Force reboot Android Emulator
adb reboot- 공유 링크 만들기
- X
- 이메일
- 기타 앱
댓글
댓글 쓰기