美文网首页
1.2 创建项目

1.2 创建项目

作者: 倪灏 | 来源:发表于2017-06-21 17:35 被阅读0次

简介

创建一个 react-native 项目

初始化

初始化

react-native init rn_demo

使用淘宝的镜像服务器加快下载速度.

npm config set registry=https://registry.npm.taobao.org/

初次运行

切换到项目的根目录

cd rn_demo

运行 iOS

1、使用 xcode 直接打开文件

2、使用终端启动

react-native run-ios

运行 Android

1、使用 Android studio 打开

2、使用终端打开

react-native run-android

相关文章

网友评论

      本文标题:1.2 创建项目

      本文链接:https://www.haomeiwen.com/subject/nlytcxtx.html