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. U32670 小凯的数字 数学

    这是洛谷一个比赛中的一道题,和去年NOIP D1T1挺像.我看了一眼之后想“这不是小学奥数吗?求一个数字和就好了呀”...然后,60,剩下T了,gg. 只好看正解,但是一脸懵逼???然后看了证明,c* ...

  2. 最短路径问题(floyd)

    http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=1867 #include<stdio.h& ...

  3. java Collection接口

    Collection 1——————Set子接口:无序,不允许重复. 2——————List子接口:有序,允许重复. Set和List对比: 1.set:检索元素的效率比较低,删除和插入效率比较高,删 ...

  4. Python迭代器(斐波拉切数列实例)

    将一个容器通过iter()函数处理后,就变成了迭代器.迭代器有2个魔法方法__iter__.__next__,一个迭代器必须实现__iter__,这个方法实际上是返回迭代器本身(return self ...

  5. Elasticsearch之curl删除索引库

    关于curl创建索引库的介绍,请移步 Elasticsearch之curl创建索引库 [hadoop@djt002 elasticsearch-2.4.3]$ curl -XPUT 'http://1 ...

  6. P2241 统计方形(数据加强版)

    题目背景 1997年普及组第一题 题目描述 有一个n*m方格的棋盘,求其方格包含多少正方形.长方形 输入输出格式 输入格式: n,m因为原来数据太弱,现规定m小于等于5000,n小于等于5000(原来 ...

  7. 一张图说明DIV盒子距离

    虚线的宽高为你实际指定的width和height 虚线外的白色区域为padding 红色区域为border的width 红色外的区域为margin

  8. 易企CMS主要模板文件介绍

    article.tpl 文章内容页模板 catalog.tpl 文章,产品目录页模板 category.tpl 分类页模板 comment.tpl 留言页模板 footer.tpl 页尾模板 head ...

  9. php正则表达式应用

    正则表达式 1.替换“/\d/”,“#”,$str:正则表达式\d 数字,替换为#,字符串 $str = "2hello 5li 6lei"; echo preg_replace( ...

  10. MVC5+EasyUI+EF6+Linq通用权限系统出炉--登录(2)

    1.输入验证码后 自动识别验证码并登录.