[docs] Add docs about Linux and Windows support

This commit is contained in:
Martin Konicek 2015-10-21 14:02:27 +01:00
parent 43d6b1bbfa
commit 0b5179dce7
3 changed files with 37 additions and 10 deletions

View File

@ -4,30 +4,26 @@ title: Android Setup
layout: docs
category: Quick Start
permalink: docs/android-setup.html
next: tutorial
next: linux-windows-support
---
This guide describes basic steps of the Android development environment setup that are required to run React Native android apps on an android emulator. We don't discuss developer tool configuration such as IDEs here.
### If you already have the Android SDK
1. Make sure to update the required packages to the versions mentioned below (see screenshots)
### If you don't have the Android SDK
### Install the Android SDK (unless you have it)
1. [Install the latest JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
2. Install the Android SDK:
- **On Mac**: `brew install android-sdk`, add `export ANDROID_HOME=/usr/local/opt/android-sdk` to your `~/.bashrc`, `~/.bash_profile` or whatever your shell uses
- **On Mac**: `brew install android-sdk`
- **On Linux and Windows**: [Download from the Android website](https://developer.android.com/sdk/installing/index.html)
### Define the ANDROID_HOME environment variable
__IMPORTANT__: Make sure the `ANDROID_HOME` environment variable points to your existing Android SDK:
- **On Mac**, add this to your `~/.bashrc`, `~/.bash_profile` or whatever your shell uses:
# If you installed the SDK via Homebrew, otherwise ~/Library/Android/sdk
export ANDROID_HOME=/usr/local/opt/android-sdk
- **On Linux**, add this to your `~/.bashrc`, `~/.bash_profile` or whatever your shell uses:
export ANDROID_HOME=<path_where_you_unpacked_android_sdk>

View File

@ -9,7 +9,7 @@ next: android-setup
## Requirements
1. OS X - Only OS X is currently supported
1. OS X - This guide assumes OS X which is needed for iOS development.
2. [Homebrew](http://brew.sh/) is the recommended way to install Watchman and Flow.
3. Install [Node.js](https://nodejs.org/) 4.0 or newer.
- Install **nvm** with [its setup instructions here](https://github.com/creationix/nvm#installation). Then run `nvm install node && nvm alias default node`, which installs the latest version of Node.js and sets up your terminal so you can run it by typing `node`. With nvm you can install multiple versions of Node.js and easily switch between them.
@ -27,6 +27,8 @@ We recommend periodically running `brew update && brew upgrade` to keep your pro
To write React Native apps for Android, you will need to install the Android SDK (and an Android emulator if you want to work on your app without having to use a physical device). See [Android setup guide](android-setup.html) for instructions on how to set up your Android environment.
_NOTE:_ There is experimental [Windows and Linux support]((/react-native/docs/linux-windows-support) for Android development.
## Quick start
$ npm install -g react-native-cli

View File

@ -0,0 +1,29 @@
---
id: linux-windows-support
title: Linux and Windows Support
layout: docs
category: Quick Start
permalink: docs/linux-windows-support.html
next: tutorial
---
As React Native on iOS requires a Mac and most of the engineers at Facebook and contributors use Macs, support for OS X is a top priority. However, we would like to support developers using Linux and Windows too. We believe we'll get the best Linux and Windows support from people using these operating systems on a daily basis.
Therefore, Linux and Windows support for the development environment is an ongoing community responsibility. This can mean filing issues and submitting PRs, and we'll help review and merge them. We are looking forward to your contributions and appreciate your patience.
As of **version 0.13** (currently in rc) Android development with React native is mostly possible on Linux and Windows. You'll need to install [Node.js](https://nodejs.org/) 4.0 or newer. On Linux we recommend installing [watchman](https://facebook.github.io/watchman/docs/install.html), otherwise you might hit a node file watching bug.
## What's missing on Linux
The basic Android development workflow should be working.
Opening the Chrome debugger when you select Menu -> Debug JS is not supported yet.
## What's missing on Windows
On Windows the packager won't be started automatically when you run `react-native run-android`. You can start it manually using:
cd MyAwesomeApp
node node_modules/react-native/packager/packager.js
Opening the Chrome debugger when you select Menu -> Debug JS is not supported yet.