Using just the default code from react-native init AwesomeProject
, when I run the app I get the \'ReferenceError: Can\'t find variable: __fbBatchedBridge (line 1 in
Thank you rmevans9 and Anonsage for your answers!
I am using HTC One
on Ubuntu and there is no menu option, anyway this is the summary of the answers that worked for me:
Create the project
$ react-native init MyProject
$ cd MyProject/
In first console tab run and leave it running as you develop (react-native start
alternative):
$ npm start
In second console tab compile and install the project (connect the device to the USB if you want):
$ react-native run-android
Fix ReferenceError: Can't find variable: __fbBatchedBridge
:
ifconfig
on Linux/Mac, for example:
inet addr:192.168.0.3
Dev Settings
-> Debug server host & port for device
in Debugging
section and copy your local ip address with the specific port:
192.168.0.3:8081
(the port can be viewed when running npm start
from the first tab)
then go/press Back
Enable Live Reload
(to see changes live when editing) Reload JS