mailme365
mailme365

Reputation: 551

react-native run-android stop working by the sudden

In the past weeks, I have been using react-native run-android to test my android app in android emulator successfully.

Yesterday, I tried to generate a signed APK by following the link https://facebook.github.io/react-native/docs/signed-apk-android.html#content, the signed APK does work in my cellphone.

Today, when I try to run react-native run-android again to test new features in emulator, the packager run successfully, Android emulator report "ReferenceError can't find variable _fbBatchedBridge(line 1 in the generated bundle), when I hit "RELOAD JS", it report "Unable to download JS bundle, did you forget to start development server or connect your device?

I even tried to change the DEV settings by adding the ip:8081, still no luck.

Could anyone help on this, thanks a lot

Upvotes: 1

Views: 1224

Answers (1)

agenthunt
agenthunt

Reputation: 8678

You need to run this command.

adb reverse tcp:8081 tcp:8081

https://facebook.github.io/react-native/docs/running-on-device.html#method-1-using-adb-reverse-recommended

Upvotes: 2

Related Questions