Am trying to run my first react native project but am getting error
“Couldn’t get batched bridge, make sure your package is bundled correctly”
Please help me to fix it- Am using windows machine
I had the same issue. Follow these steps for the resolution in your project’s folder:
This might take a while. Output will look like this:
Once this is over run this:
I had the same problem in a Windows machine when following the Getting Started tutorial, and using Visual Studio Emulator for Android.
In my case, I found out that it was failing because it couldn’t find adb when building the app, so I solved it by adding the Android SDK Platform Tools folder to my PATH. Check that you have it! 🙂
If people are still looking for solution. (Please note this works for devices with android 5.0 or greater)
To install and launch your app on the device, you need to run the following adb command (which connects to the development server running on your development machine)
$ adb reverse tcp:8081 tcp:8081
For Mac users:–
1. Go to Library/Android/sdk/platform-tools 2. ./adb reverse tcp:8081 tcp:8081
For Windows users:-
1. Go to C:\Users\<username>\AppData\Local\Android\sdk\platform-tools 2. adb reverse tcp:8081 tcp:8081
I was having the same issue-
What worked for me:
1. Open the app in the android device.
2. Shake it(to reload)
3. Then, on the menu click on dev settings
4. Then click on Debug server host & port for device
5. Enter your computer’s IP followed by port(viz 8081 normally). e.g. 192.168.0.3:8081
6. RELOAD. Voila! It worked.