react-native:环境安装
2016-06-13 20:20
337 查看
环境要求:OS X ,要开发ios App就必须使用Mac OS系统。
Homebrew:安装教程 http://brew.sh/,Mac上的包管理软件
Node.js : https://nodejs.org/en/
watchman:https://facebook.github.io/watchman/docs/install.html facebook的一个文件监视系统。
flow:http://flowtype.org/ js的变量检查
安装Homebrew:
/usr/bin/ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"
安装node.js
brew install node
安装watchman
brew install watchman
安装flow
brew install flow
更新Homebrew版本库
brew update
更新软件
brew upgrade
npm install -g react-native-cli
react-native安装成功
react-native init HelloRN
react-native run-ios
在当前目录下面多了一个ios的目录,里面新建一个project,HelloRN的项目。
react-native run-android
在当前目录下会多出一个anroid的目录,里面是android项目的文件。
Homebrew:安装教程 http://brew.sh/,Mac上的包管理软件
Node.js : https://nodejs.org/en/
watchman:https://facebook.github.io/watchman/docs/install.html facebook的一个文件监视系统。
flow:http://flowtype.org/ js的变量检查
安装
安装Homebrew:/usr/bin/ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"
安装node.js
brew install node
安装watchman
brew install watchman
安装flow
brew install flow
更新当前软件到最新版本
更新Homebrew版本库brew update
更新软件
brew upgrade
安装react-native
npm install -g react-native-cli─┬ react-native-cli@0.1.10 ├─┬ chalk@1.1.1 │ ├─┬ ansi-styles@2.2.0 │ │ └── color-convert@1.0.0 │ ├── escape-string-regexp@1.0.5 │ └── strip-ansi@3.0.1 ├─┬ prompt@0.2.14 │ ├─┬ read@1.0.7 │ │ └── mute-stream@0.0.6 │ └─┬ utile@0.2.1 │ ├── i@0.3.4 │ └─┬ rimraf@2.5.2 │ └─┬ glob@7.0.0 │ ├─┬ minimatch@3.0.0 │ │ └─┬ brace-expansion@1.1.3 │ │ └── balanced-match@0.3.0 │ └── once@1.3.3 └── semver@5.1.0
react-native安装成功
第一个react-native项目
react-native init HelloRNo run your app on iOS: cd /Users/***/Documents/github/react-native/HelloRN react-native run-ios - or - Open /Users/***/Documents/github/react-native/HelloRN/ios/HelloRN.xcodeproj in Xcode Hit the Run button To run your app on Android: Have an Android emulator running (quickest way to get started), or a device connected cd /Users/***/Documents/github/react-native/HelloRN react-native run-android
运行
react-native run-ios在当前目录下面多了一个ios的目录,里面新建一个project,HelloRN的项目。
react-native run-android
在当前目录下会多出一个anroid的目录,里面是android项目的文件。
相关文章推荐
- React-Native开发(三)---仿QQ登录页面
- react-native IDE(nuclide)安装
- Android:ReactNative环境搭建遇到的坑
- react-native不能生成index.android.bundle
- react-native android_home配置问题(android)
- React构建单页应用方法与实例
- React-Native开发(二)-ListView
- react-native遇到的坑,及解决方法
- React Native:从入门到原理
- React Native Bundle 拆包工具之 moles-packer 介绍
- React Native十四:原生模块
- 一小时包教会 —— webpack 入门指南
- 史上最详细Windows版本搭建安装React Native环境配置
- React-native开发系列(一)---NavigatorIOS应用
- React Native 植入原生应用
- React Native学习之Modal控件自定义弹出View
- react native的一些基本概念
- ReactNative Android和iOS的实现原理
- React简谈
- React Native笔记