Failed to get BatchBridge, make sure your package is properly packaged

I am trying to run an application created using the reaction I created. I get the screen below when I launch it initially in my phone.

enter image description here

I tried running "action-native start", and when I ran it, I got the following result.

enter image description here

While he stops at “Initializing the package manager,” I launched the “reactive android” on another terminal. However, I get the same BatchBridge error. When I click the refresh button on the error screen, I get the screen below.

enter image description here

What am I doing wrong here? In my code, I only have console.log. Just a new project to start. Any advice would be much appreciated. I tried to refer to the error response "Failed to get BatchedBridge, make sure your package is correctly packaged" when starting the application , but its Linux command set.

+7
android debugging reactjs react-native adb
source share
5 answers

If you are using Android 5.0+, follow these steps on the command line to connect to the development server:

adb reverse tcp:8081 tcp:8081 

Then select "Restart JS" from the "Developer" menu by shaking the device.

If the above steps do not work or you are using a lower version of Android, try connecting via Wi-Fi:

  • Open the "Developer" menu, go to "Dev Settings".
  • Select "Debug server host for device."
  • Enter the IP address and port of the device, for example. 10.0.0.1:8081
  • Reboot the application by selecting "Update JS" in the "Developer" menu.
+10
source share

Shake the phone to get "Dev Settings"> "Debug Server" and the port for the device> "your IP address: 8081", for example. 192.XXX.XX.xx: 8081 "

This solved my problem. :)

+2
source share

Kill the application on your device, then open a terminal and run the command below.

 react-native start 

Then open the application again from your device and it will start working.

If you use an Android device via USB and disconnected it, you may have to start it first

 adb reverse tcp:8081 tcp:8081 

Hope this helps you.

+1
source share

you are using a damaged jsbundle file. Restore jsbundle with

 react-native bundle --platform android --dev true --entry-file index.android.js --bundle-output music.jsbundle 
0
source share

You must have an index.android.bundle file to upload to your resource folder.

Open the project directory and press "Change" + "Edit", open the command line. Then paste this command:

  react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android / app / src / main / assets / index.android.bundle --assets-dest android / app / src / main / res /
0
source share

All Articles