I am trying to reverse-forward port through ADB, but it just returns cryptic error of error: closed
. Normal forwarding works. Session snippet:
$
Follow these steps carefully.
Note: All commands need to run inside a project only.
Run this command first:
npm react-native start
Open another window in the same project and run:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
This will create index.android.bundle
in the assets folder
Run:
npm react-native run-android
Now you can get apk in the build folder which will work fine.