Hacker News new | past | comments | ask | show | jobs | submit login

Anyone got the Android skeleton working? I'm getting a red page "unable to download JS bundle" despite having the dev server running.

I'm using a 2013 Moto X on Android 5.1.




Make sure your phone can connect to your machine: check https://facebook.github.io/react-native/docs/running-on-devi...


Indeed, I had to input the local IP of my machine with "Debug server host for device". Thank you!

Then I got a NPE:

[21:36:12] <START> request:/index.android.bundle?platform=android TypeError: Cannot read property 'root' of null at /Volumes/Devdisk/Perso/ErwanReact/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84 at tryCallOne (/Volumes/Devdisk/Perso/ErwanReact/node_modules/react-native/node_modules/promise/lib/core.js:37:12) at /Volumes/Devdisk/Perso/ErwanReact/node_modules/react-native/node_modules/promise/lib/core.js:103:15 at flush (/Volumes/Devdisk/Perso/ErwanReact/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29) at doNTCallback0 (node.js:408:9) at process._tickCallback (node.js:337:13)

I was able to fix it by replacing this line:

https://github.com/facebook/react-native/blob/master/package...

By this:

    return fileWatcher.getWatchers().then(([watcher]) => !!(watcher.watchProjectInfo && watcher.watchProjectInfo.root));


`adb reverse tcp:8081 tcp:8081` works like a charm for me




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: