Windows 安装react native
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的更多相关文章
- windows安装React Native开发运行环境
React Native是什么 React Native是facebook开源的一个用于开发app的框架.React Native的设计理念:既拥有Native (原生) 的用户体验.又保留React ...
- 史上最全Windows版本搭建安装React Native环境配置
史上最全Windows版本搭建安装React Native环境配置 配置过React Native 环境的都知道,在Windows React Native环境配置有很多坑要跳,为了帮助新手快速无误的 ...
- 史上最详细Windows版本搭建安装React Native环境配置 转载,比官网的靠谱亲测可用
史上最详细Windows版本搭建安装React Native环境配置 2016/01/29 | React Native技术文章 | Sky丶清| 95条评论 | 33530 views ...
- Windows版本搭建安装React Native环境配置
1 安装Chocolatey 打开cmd黑窗口 @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-obje ...
- Windows 10 & React Native & Android
Windows 10 & React Native & Android https://facebook.github.io/react-native/docs/getting-sta ...
- 【问题与解决】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 ...
- react-native学习笔记--史上最详细Windows版本搭建安装React Native环境配置
参考:http://www.lcode.org/react-native/ React native中文网:http://reactnative.cn/docs/0.23/android-setup. ...
- 史上最详细Windows版本搭建安装React Native环境配置
说在前面的话: 感谢同事金晓冰倾情奉献本环境搭建教程 之前我们已经讲解了React Native的OS X系统的环境搭建以及配置,鉴于各大群里有很多人反应在Windows环境搭建出现各种问题,今天就特 ...
- 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% ...
随机推荐
- luogu2024 食物链
题目大意 动物王国中有三类动物 A,B,C,这三类动物的食物链构成了有趣的环形.A 吃 B,B吃 C,C 吃 A.现有 N 个动物,以 1 - N 编号.每个动物都是 A,B,C 中的一种,但是我们并 ...
- [RK3288][Android6.0] 调试笔记 --- 系统第一次开机进入Recovery模式原因【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/53464461 latform: ROCKCHIPOS: Android 6.0Kernel: ...
- Java 错误:找不到或无法加载主类(源文件中含有包名 package)
1. 问题定位 编译(javac)和执行(java)java 程序时,出现这种类型的错误:找不到或无法加载主类: 首先排除是否是环境变量配置不当造成的问题,只要保证,命令行界面能够识别 javac/j ...
- B. Jeff and Periods(cf)
B. Jeff and Periods time limit per test 1 second memory limit per test 256 megabytes input standard ...
- Chrome 最小化恢复之后部分黑屏
解决办法:设置->显示高级设置->关闭硬件加速
- 安装DotnetCore-Vue项目模板
dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
- [转]RDLC报表——动态添加列
本文转自:http://www.cnblogs.com/pszw/archive/2012/07/19/2599937.html 前言 最近接到一个需求:在给定的数据源中,某(些)列,可能需要单独统计 ...
- 文字水平居中和垂直居中的CSS
首先选择一个需要显示文字的选择器,我这里选择的是微信小程序里面的<view>选择器,在其他语言(如html)的选择器里是一样的做法: <view class="btn-it ...
- 判断wifi是2.4G还是5G
1.WifiInfo 源码: int mFrequency=wifiInfo.getFrequency(); /** * @hide * TODO: makes real freq boundarie ...
- SQL SERVER2012 安装