1、下载node.js (https://nodejs.org/en/)

2、安装node.js,安装完成后按住 图标键+R ,输入CMD进入命令行终端,输入npm -v

C:\Users\Administrator>npm -v
5.6.

3、输入 npm install -g react-native-cli 安装命令行工具

C:\Users\Administrator>npm install -g react-native-cli
C:\Users\Administrator\AppData\Roaming\npm\react-native -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\react-native-cli\index.js
+ react-native-cli@2.0.
added packages in .898s

4、查看帮助:

C:\Users\Administrator>react-native --help

  Usage: react-native [command] [options]

  Commands:

    init <ProjectName> [options]  generates a new project and installs its dependencies

  Options:

    -h, --help    output usage information
-v, --version output the version number C:\Users\Administrator>

5、安装Android Studio

http://www.android-studio.org/

安装完成后

6、创建应用:

C:\Users\Administrator>react-native init 你的项目名称
This will walk you through creating a new React Native project in C:\Users\Administrator\LoveDemo
'yarn' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�����������
Installing react-native...
Consider installing yarn to make this faster: https://yarnpkg.com
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN react-native@0.55. requires a peer of react@16.3. but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-native@3.2. requires a peer of eslint@^3.17. || ^4.0. but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2. (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) + react-native@0.55.
added packages in .306s
Setting up new React Native app in C:\Users\Administrator\LoveDemo
Installing React...
npm WARN eslint-plugin-react-native@3.2. requires a peer of eslint@^3.17. || ^4.0. but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2. (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) + react@16.3.
added package in .065s
Installing Jest...
npm WARN eslint-plugin-react-native@3.2. requires a peer of eslint@^3.17. || ^4.0. but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2. (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) + react-test-renderer@16.3.
+ babel-preset-react-native@4.0.
+ jest@22.4.
+ babel-jest@22.4.
added packages and updated package in .568s
To run your app on iOS:
cd C:\Users\Administrator\LoveDemo
react-native run-ios
- or -
Open ios\LoveDemo.xcodeproj in Xcode
Hit the Run button
To run your app on Android:
cd C:\Users\Administrator\LoveDemo
Have an Android emulator running (quickest way to get started), or a device connected
react-native run-android (表示已经完成)

Windows 安装react native的更多相关文章

  1. windows安装React Native开发运行环境

    React Native是什么 React Native是facebook开源的一个用于开发app的框架.React Native的设计理念:既拥有Native (原生) 的用户体验.又保留React ...

  2. 史上最全Windows版本搭建安装React Native环境配置

    史上最全Windows版本搭建安装React Native环境配置 配置过React Native 环境的都知道,在Windows React Native环境配置有很多坑要跳,为了帮助新手快速无误的 ...

  3. 史上最详细Windows版本搭建安装React Native环境配置 转载,比官网的靠谱亲测可用

    史上最详细Windows版本搭建安装React Native环境配置   2016/01/29 |  React Native技术文章 |  Sky丶清|  95条评论 |  33530 views ...

  4. Windows版本搭建安装React Native环境配置

    1 安装Chocolatey 打开cmd黑窗口 @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-obje ...

  5. Windows 10 & React Native & Android

    Windows 10 & React Native & Android https://facebook.github.io/react-native/docs/getting-sta ...

  6. 【问题与解决】Mac OS通过 npm 安装 React Native 报错(checkPermissions Missing write access to /usr/local/lib/node_modules)

    报错情况: 当Mac OS通过 npm 安装 React Native 报错,警告文字为:checkPermissions Missing write access to /usr/local/lib ...

  7. react-native学习笔记--史上最详细Windows版本搭建安装React Native环境配置

    参考:http://www.lcode.org/react-native/ React native中文网:http://reactnative.cn/docs/0.23/android-setup. ...

  8. 史上最详细Windows版本搭建安装React Native环境配置

    说在前面的话: 感谢同事金晓冰倾情奉献本环境搭建教程 之前我们已经讲解了React Native的OS X系统的环境搭建以及配置,鉴于各大群里有很多人反应在Windows环境搭建出现各种问题,今天就特 ...

  9. Windows版本搭建安装React Native环境配置及相关问题

    此文档整理参考地址: http://www.lcode.org/%E5%8F%B2%E4%B8%8A%E6%9C%80%E8%AF%A6%E7%BB%86windows%E7%89%88%E6%9C% ...

随机推荐

  1. [java设计模式]之单例模式

    -------------------此部分比較深入地解说了单例模式,原文链接已给出.兴许将涉及一些常见面试问题--------------------------- 原文地址:http://www. ...

  2. 生活的 tricks

    1. 远距离传递 传真(需要附近有传真机):发 QQ.微信拍照,自己打印: 2. 超市的设计 如果是两层的话,入口一定在第一楼,出口在第二楼,也即当你需要出去的时候,需要贯穿整个超市: 用的在第一楼: ...

  3. [NOIP 2016] 蚯蚓

    [题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=4721 [算法] 首先,我们可以维护一个堆,堆中存放蚯蚓的长度,由于除当前蚯蚓其他的蚯 ...

  4. B3300 [USACO2011 Feb]Best Parenthesis 模拟

    这是我今天遇到最奇怪的问题,希望有人帮我解释一下... 一开始我能得90分: #include<iostream> #include<cstdio> #include<c ...

  5. openSTack manual 整合调优

  6. iOS网络开发工具集----字符串操作和时间操作

    一.字符串的操作方法 #pragma mark - 创建字符串 - (void)CreatString { // <1> 创建字符串 NSString *strS = @"Thi ...

  7. (Go)10.流程控制示例

    package main import ( "math/rand" "fmt" ) func main() { //var n int n := rand.In ...

  8. Drainage Ditches(网络流(EK算法))

    计算最大流,EK算法模板题. #include <stdio.h> #include <string.h> #include <queue> using names ...

  9. Spring Boot (14) 数据源配置原理

    数据源配置源码 这里截取org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration的部分源码,主要介绍Tomcat和Hika ...

  10. spring - quartz - experssion 表达式

    字段 允许值 允许的特殊字符 秒 0-59 , - * / 分 0-59 , - * / 小时 0-23 , - * / 日期 1-31 , - * ? / L W C 月份 1-12 或者 JAN- ...