When I run my React Native app on my Android device, I get this error:
I found this answer but it is not running for me: Answer.
Further I'm using React Native on Ubuntu and React Native isn't create local.properties (sdk.dir=/path/to/sdk/) and I need to change buildToolsVersion "23.0.1" to "23.0.3". I want to auto make those.
6 Answers
This getting started tutorial says:
A common issue is that the packager is not started automatically when you run
react-native run-android
. You can start it manually usingreact-native start
.
and it solved my same problem.

- 462
- 4
- 9
-
this work for me. on my other laptop `react-native run-android` launch the other console (opened by `start`) itself. anyway to do it ? – AlainIb Jun 12 '17 at 11:50
Did you setup the ip/port
to the dev
server on the device?
If not shake the device to get the dev
menu, click "Dev Settings" / "Debug server host & port for device"
.

- 1,712
- 1
- 18
- 33

- 124
- 4
-
2In general, following the steps in http://facebook.github.io/react-native/docs/running-on-device-android.html#configure-your-app-to-connect-to-the-local-dev-server-via-wi-fi can be very useful for solving this kind of problem. – Tomty Sep 13 '16 at 00:56
-
I kept looking at this answer and not really getting what was meant by "shake the device" or somehow mentally dismissing it. This is actually what it means. Shake your android device and that brings up the development menu and then you follow the steps above or on the linked react-native docs. – flyingace Nov 08 '16 at 05:16
Disabling mobile data/wifi connection on my emulator's device caused this error for me.
The connection was disabled to test offline/PWA functions.
My answer won't help the OP, but I'll leave it here for future Googlers.

- 33
- 1
- 6
-
Thanks. I disabled mobile data for some testing and forgot to switch it on. This helped!! – Anil VK Nov 14 '16 at 07:24
Below commands worked for me
1.react-native run-android
2.react-native start
execute 1 command i.e 'react-native run-android' it will show you red screen with BatchedBridge error, then execute 2 command i.e 'react-native start' then just reload the emulator error disappears.

- 873
- 8
- 12
Use following commands on cmd and it will work fine.
npm uninstall -g react-native-cli npm cache clean
npm install -g react-native-cli
react-native start
react-native run-android

- 456
- 3
- 11
-
please add a return character before 'npm cache clean' else you are removing npm ! – altagir Apr 30 '17 at 21:45