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

Solution

Run the following:

react-native run-android
react-native start --reset-cache

Description

After creating a project and not changing a single file, I tried to test it on my 4.4.2. device. I got this red screen right on start of the app and after dismissing it, only white screen was shown instead of welcome message that was supposed to be there.

screenshot_2016-08-10-11-45-29

I also got this error on 5.1.1, but the project worked fine on 6.1.1.
Android emulator (for 4.4.2) was also able to display the messages without this redscreen

Edit: On Stack Overflow, user tbo has posted an answer with a workaround. It does work, however it’s not ideal as it takes more time http://stackoverflow.com/questions/38870710/error-could-not-get-batchedbridge-make-sure-your-bundle-is-packaged-properly/38874952#38874952

12 thoughts on “Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start of app

  1. I got it to work by changing in the file .buckconfig the line:
    target = Google Inc.:Google APIs:23
    to
    target = Google Inc.:Google APIs:24

    Edited:
    I was having the same exception on the device Z3 Compact D5803 – 6.0.1
    Then i saw in SDK Manager that Android 6.X has api level 24 and not 23, then i changed.

  2. If this is happening on physical device, do adb reverse tcp:8081 tcp:8081, then reload your app
    Hope it helps!!

  3. I had the same issue.

    I first needed to run the server
    react-native start

    and then
    react-native run-android

  4. any feasible solution?

    react-native start && react-native run-android is not working for me.

  5. For physical device in helps to me (in console):
    adb reverse tcp:8081 tcp:8081

    Environment:

    • Ubuntu 15.10
    • Android studio 2.1.3
    • HTC Desire 626G ( Android 6.0.1 )

    p.s app build with android studio

  6. So I dig a little bit more and found that my <root>/android/app/build/intermediates/assets/debugfolder was empty and by running cd android && ./gradlew assembleDebug was not creating those files required, which are later used by javascript thread in our react native apps.

    I ran manually the following command which the debug build command should have created ideally.

    node node_modules/react-native/local-cli/cli.js bundle --platform android --dev true --reset-cache --entry-file index.android.js --bundle-output /<path to dir>/android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest /<path to dir>/android/app/build/intermediates/res/merged/debug

    After running these commands I found two bundle files in my <root>/android/app/build/intermediates/assets/debug

    And then a I ran again cd android && ./gradlew installDebug my app started working again.

Comments are closed.

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

Solution

Run the following:

react-native run-android
react-native start --reset-cache

Description

After creating a project and not changing a single file, I tried to test it on my 4.4.2. device. I got this red screen right on start of the app and after dismissing it, only white screen was shown instead of welcome message that was supposed to be there.

screenshot_2016-08-10-11-45-29

I also got this error on 5.1.1, but the project worked fine on 6.1.1.
Android emulator (for 4.4.2) was also able to display the messages without this redscreen

Edit: On Stack Overflow, user tbo has posted an answer with a workaround. It does work, however it’s not ideal as it takes more time http://stackoverflow.com/questions/38870710/error-could-not-get-batchedbridge-make-sure-your-bundle-is-packaged-properly/38874952#38874952

10 thoughts on “Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start of app

  1. If this is happening on physical device, do adb reverse tcp:8081 tcp:8081, then reload your app
    Hope it helps!!

  2. I had the same issue.

    I first needed to run the server
    react-native start

    and then
    react-native run-android

  3. any feasible solution?

    react-native start && react-native run-android is not working for me.

  4. For physical device in helps to me (in console):
    adb reverse tcp:8081 tcp:8081

    Environment:

    • Ubuntu 15.10
    • Android studio 2.1.3
    • HTC Desire 626G ( Android 6.0.1 )

    p.s app build with android studio

  5. So I dig a little bit more and found that my <root>/android/app/build/intermediates/assets/debugfolder was empty and by running cd android && ./gradlew assembleDebug was not creating those files required, which are later used by javascript thread in our react native apps.

    I ran manually the following command which the debug build command should have created ideally.

    node node_modules/react-native/local-cli/cli.js bundle --platform android --dev true --reset-cache --entry-file index.android.js --bundle-output /<path to dir>/android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest /<path to dir>/android/app/build/intermediates/res/merged/debug

    After running these commands I found two bundle files in my <root>/android/app/build/intermediates/assets/debug

    And then a I ran again cd android && ./gradlew installDebug my app started working again.

Comments are closed.