Skip to content

Instantly share code, notes, and snippets.

@lucasfeijo
Last active August 14, 2018 14:12
Show Gist options
  • Save lucasfeijo/61b845c7b4e29fd5b6dcee63e65ac392 to your computer and use it in GitHub Desktop.
Save lucasfeijo/61b845c7b4e29fd5b6dcee63e65ac392 to your computer and use it in GitHub Desktop.
React Native commands
# `~/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.
@gregblake
Copy link

gregblake commented Aug 14, 2018

When running the following command:

./tools/bin/avdmanager create avd -n test -k "system-images;android-25;google_apis;x86" -b x86 -c 1000M -d 7 -f

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment