Tag Archives: Could not get BatchedBridge

[Solved] Could not get BatchedBridge, make sure your bundle is packaged correctly

Today, after modifying the app icon and image, when run-android, it appears Could not get BatchedBridge, make sure your bundle is packaged correctly

Solution:

Open the project, find the package.json file, and add a line to the scripts

“bundle-android”: “react-native bundle –platform android –dev false –entry-file index.android.js –bundle-output android/app/src/main/assets/index.android.bundle –sourcemap-output android/app/src/main/assets/index.android.map –assets-dest android/app/src/main/res/”

How to Solve React Native Error: Could not get BatchedBridge

After developing react native under windows and executing react native run Android , the mobile phone will display a red screen prompt: could not get batchedbridge, make sure your bundle is packaged correctly will be displayed

This situation is usually caused by the occupation of the 8081 port of the computer, because react native will start the nodejs service on the 8081 port, and the mobile debugging depends on this service

We can see what program occupies port 8081: 1. Execute netstat - AON | findstr "8081" 2

2. See that the 8064 program is listening on this port, and then execute tasklist | findstr 8064 task

You can see that the process name of 8064 is WiFi master.exe. It was originally WiFi sharing master, which occupied port 8081

3. Close the WiFi sharing master software, and then execute react native run Android to run normally