-
-
Save badarshahzad/f3081bcb6e621e397de26e38cea58fb0 to your computer and use it in GitHub Desktop.
/******************* | |
* Android | |
*******************/ | |
Where is the emuator in your directory: | |
/root/Android/Sdk/emulator | |
$> ./emulator -list-avds | |
/******************* | |
* React Native | |
*******************/ | |
$> |
React Native init Project:
$> react-native run android
$> react-native start
Expo project:
$> npm start
$> npm run-android
$> expo start
Show mysql databases tables in readable pages pager less -SFX
To enable React Native logcat as compare to Chrome logs
adb logcat *:S ReactNative:V ReactNativeJS:V
adb logcat AndroidRuntime:E *:S
echo fs.inotify.max_user_instances=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
echo fs.inotify.max_queued_events=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
this is used when the watch-man is giving unexpected error and react-native project was not loading.
You can check what versions of dependencies are resolved using gradlew app:dependencies
on your android folder. All play-services libs should resolve to the same version, and all support libs should resolve to the same version.
To kill the demon of the emulator.
Issues like
-
adb server is out of date. killing...
cannot bind 'tcp:5037': Address already in use ADB server didn't ACK failed to start daemon -
Error: device offline
badarshahzad:emulator$ netstat -tulpn|grep 5554
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:5554 0.0.0.0:* LISTEN 14522/qemu-syst
Referance: https://stackoverflow.com/questions/10680417/error-device-offline/15883498
For IOS $ react-native log-ios
For Android $ react-native log-android
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
Reference: https://stackoverflow.com/questions/52777413/reactnative-metro-bundler-not-starting-automatically
react-native run-android --variant=release
react-native run-android --variant=debug
There is not debug.keystore in android
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
When you clone someone else react native repo,normally you have to run the packager server with this command to prevent internal server error.
$> react-native start --reset-cache