First, install the node
https://www.cnblogs.com/51ma/p/11276413.html
After installing, set about the node of the mirror Download, into a domestic address. The address is provided by Taobao mirror, faster.
Type in cmd command directly inside these two command.
npm config set registry https://registry.npm.taobao.org --global npm config set disturl https://npm.taobao.org/dist --global
Second, install python
https://www.cnblogs.com/51ma/p/9447748.html
Mounting the Yarn, React Native command-line tool (react-native-cli)
** Yarn is an alternative npm tools provided by Facebook, you can speed up the download node module.
** React Native command-line tool used to create, initialize, update project, run the Package Service (packager) and other tasks.
After installing python, directly open cmd command, type the following code can be installed
npm install -g yarn react-native-cli
Similarly also provided after the installation of the mirror source yarn:
yarn config set registry https://registry.npm.taobao.org --global yarn config set disturl https://npm.taobao.org/dist --global
After installing yarn yarn can be used instead of the npm, for example with yarn instead of npm install command, instead of npm install a third-party library name with yarn add a third-party library name.
Third, the installation jdk
slightly
Fourth, the installation androidstudio
slightly
Fifth, the project to create the first RN
Create a project directory, cmd enter, type the following command to create
react-native init FirstProject
Which FirstProject for the project name, you can modify yourself, wait a few minutes appear
After the download is complete, you can see the emergence of a directory below the directory, this is the future react nactive download a good project, if it is android projects need to focus on the android directory folder.
A, using AndroidStudio create a new project, and copy files thereof local.properties as to correspond to root android
B, or even open the emulator machine aiming
C, or cmd then we project to run the project root directory, enter:
react-native run-android
The Discovery run successfully.
Note: One way to react-native run-android just run the application. You can also run the application directly from the Android Studio or Nuclide.
We recommend trying to use Android Studio to start after run-android success. Please do not click on the recommendation of a dependency that may pop up Android Studio projects recommended updates, or it may lead to not run .