Zygro Zygro - 1 year ago 3226
Android Question

error "Could not get BatchedBridge, make sure your bundle is packaged properly" on start of app

Trying to create a react-native project on Android 4.4.2 I get this error screen

said error

and couldn't find any way to resolve it. I tried restarting packager, reconnecting device, even reinstalling react native and starting new project. On 6.0.0 and later versions it works just fine.

tbo tbo
Answer Source

A possible solution for this is that you most probably not bundling your application first, perform the following steps and then deploy your app-debug.apk to your device

$> cd myproject  
$> react-native start > /dev/null 2>&1 &  
$> curl "http://localhost:8081/index.android.bundle?platform=android" -o
> "android/app/src/main/assets/index.android.bundle"

(if the folder assets does not exists create it)

Then run from project root

$> (cd android/ && ./gradlew assembleDebug)

install the created apk to you device, from location: android/app/build/outputs/apk/app-debug.apk

let me know if that fixes your issue

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download