Last active
August 14, 2018 14:12
-
-
Save lucasfeijo/61b845c7b4e29fd5b6dcee63e65ac392 to your computer and use it in GitHub Desktop.
React Native commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# `~/Library/Android/sdk/` is my ANDROID_HOME environment variable. | |
cd $ANDROID_HOME | |
# Create emulator with 1GB storage on Android SDK 25 called `test` | |
./tools/bin/avdmanager create avd -n test -k "system-images;android-25;google_apis;x86" -b x86 -c 1000M -d 7 -f | |
# Run emulator called `test` | |
./emulator/emulator -avd test | |
# To run on an android emulator - emulator must be already running | |
react-native run-android --appIdSuffix "dev" | |
# Press CMD+M to bring up the debug tools, hit "remote JS debugging and Chrome will open | |
# To run on an iOS simulator - will open the simulator for you | |
react-native run-ios | |
# Press CMD+D to bring up the debug tools | |
# If `INSTALL_FAILED_INSUFFICIENT_STORAGE`: | |
adb shell "pm uninstall com.powerhrg.connect.dev" | |
# or even | |
adb shell "rm -rf /data/app" | |
# or the name of packages taking too much space. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running the following command:
This resulted in the following error:
-bash: ./tools/bin/avdmanager: No such file or directory
Following these steps resolved the issue: NativeScript/NativeScript#5667 (comment)