As I can see here you need OS X to build apps with React Native. That is probably because they used it at first to create only iOS apps. Now it's possible to create Android apps with React Native but they still require OS X as development platform which doesn't make sense to me. Is there any way to create Android apps using React Native on Ubuntu OS or any other Linux?
4 Answers
Update 2: I've been developing React native apps on Ubuntu for some time now, without any issues.
Update 1: It's almost possible on linux and windows now. Check this doc page: link
Old answer: It's already almost working, from the issue shared in kzzzf's answer:
Everything works on Linux except: react-native run-android can't open a new shell window, you need to use react-native start. Will be fixed in next release. Debugging in Chrome currently relies on an AppleScript to launch Chrome. There's a PR to replace that.
Comments
Building on linux and windows is not officially supported although there are people in the community already sending pull requests that will allow to do so (main obstacle is the fact of using apple-script and calling to shell scripts from node - from react-packager and from react-cli). Main task for tracking those efforts is here: https://github.com/facebook/react-native/issues/2693
1 Comment
While it's not officially supported on Linux yet, and there are certainly some hoops to jump through, I have created a docker container that allows me to build and run android apps from Ubuntu.
The dockerfile is still a work in progress but it's available on github: https://github.com/gilesp/docker/tree/master/react_native
There's a couple of shell scripts to make local development easier - I mainly use the react-bash script to give me a shell prompt in the container for running react-native run-android etc.
It works well enough that I can have a phone connected via USB on my host machine, the react native stuff running in the container and have my edits to the code (I mainly edit using emacs on the host) appear immediately on the device.
I'm currently working on CI builds for android as there are some more hoops to jump through to create the bundled version of the javascript for deployment.
Comments
It should be possible by now. For an up to date guide on "can i build for platform X on system Y", see:
https://facebook.github.io/react-native/docs/getting-started.html