Reputation: 394
Recently i upgraded existing Android application from 0.18.0 to 0.19.0 and try to run but its giving error like
ReferenceError: can't find variable _fbBatchedBridge (line 1 in the generated bundle)" and if reload it again error change to "Unable to download JS bundle
.
used following changes.
1 change the react-native version in package.json from 0.18.0 to 0.19.0.
2 change react-native version app/build.gradle dependencies.
3 sudo npm install.
4 react-native start.
5 react-native run-android.
also try adb reverse tcp:8081 tcp:8081 and dev setting option for IP adress and remove old bablerc
"scripts": {
"clean:babelrc": "find ./node_modules -name react-packager -prune -o -name '.babelrc' -print | xargs rm -f",
"postinstall": "npm run clean:babelrc"
}
but still its giving same error.
could any one help please.
Upvotes: 1
Views: 184
Reputation: 7106
I had the same issue. In the developer menu (open it by shaking your device) you need to go in Dev Settings then Debug server host & port for device. There you need to enter your local ip address followed by the port (for example 192.168.1.10:8081).
You can find your local IP address by running ifconfig
in a terminal (you can find it under en0 I think).
Your device and computer must also be on the same wifi network.
Upvotes: 0
Reputation: 479
RN updates also comes with Native OS templates updates, try running react-native upgrade
to update your iOS/Android files.
Upvotes: 1