0

I followed the steps mentioned in following documents and everything runs perfectly.

react-native start Output

  1. https://facebook.github.io/react-native/docs/getting-started.html
  2. https://facebook.github.io/react-native/docs/android-setup.html
  3. https://facebook.github.io/react-native/docs/running-on-device-android.html

Now am trying to run the android app on my device but I get below error.

enter image description here

enter image description here

I tried following to resolve the issue:

react-native start > /dev/null 2>&1 &
adb reverse tcp:8081 tcp:8081

If I try to run without a server, bundle the jsfile into the apk by running:

curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"

I get

enter image description here I followed all the steps outlined in this question react native android failed to load JS bundle but still I am not able to resolve the issue.

I am using my smartphone's data plan on my OSX machine via hotspot. I entered my machine's IP address inet 192.168.43.14 along with port 8081 in the react-native developer setting.

Any idea what am missing here?

Device details:

OSX El Capitan 10.11.1
Nexus 5(Rooted) 6.0.1
Node - v4.2.1
Community
  • 1
  • 1
RanRag
  • 48,359
  • 38
  • 114
  • 167
  • you are not able to connect with development server. Shake your device, you will get dev options and then in dev setting specify your development server ip and port. then reload js , should work – Abhishek Apr 18 '16 at 13:43
  • @Abhishek I have already done that and it doesn't work. – RanRag Apr 18 '16 at 14:14
  • Make sure your are connected to same network. and also check if dev server is running – Abhishek Apr 18 '16 at 14:16
  • @Abhishek : Can you please check my post. I have already added the screenshot of server running & also mentioned that I have configured the IP in "dev setting" & am connected using hotspot. – RanRag Apr 18 '16 at 14:24
  • Try connecting both your mac and your device to the same wireless network rather than a hotspot. The hotspot could be the issue if you're trying to reach the development server through the network. – Zidail Apr 18 '16 at 14:49
  • Unfortunately, I don't have wifi available. So, hotspot is the only way to connect for few days. Anything else I can try. – RanRag Apr 18 '16 at 14:59

0 Answers0