Created
August 16, 2021 14:49
-
-
Save flavioribeirojr/3044b70607a140e65e8ce19088df75de to your computer and use it in GitHub Desktop.
Steps to run react-native using wsl2
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
# Windows | |
# First thing, install android-studio | |
# Powershell | |
adb kill-server | |
adb -a nodaemon server start | |
# WSL2 (Ubuntu) | |
cd android | |
./gradlew assembleDebug # assembleRelease for release builds | |
adb install -s <yourdevice> app/build/outputs/apk/yourapk.apk # You can check the identifier for your device with adb devices | |
adb reverse tcp:8081 tcp:8081 Will forward the phone's 8081 port to the computer's 8081, where the packager listens. If you are deploying over Wi-Fi, have a look at: https://facebook.github.io/react-native/docs/running-on-device-android.html#configure-your-app-to-connect-to-the-local-dev-server-via-wi-fi | |
npm start # Will run the packager |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment