react-native:环境安装
环境要求:OS X ,要开发ios App就必须使用Mac OS系统。 安装安装Homebrew:
安装node.js
安装watchman
安装flow
更新当前软件到最新版本更新Homebrew版本库
更新软件
安装react-native
─┬ react-native-cli@0.1.10
├─┬ chalk@1.1.1
│ ├─┬ ansi-styles@2.2.0
│ │ └── color-convert0.0
│ ├── escape-string-regexp5
│ └── strip-ansi@3.1
├─┬ prompt2.14
│ ├─┬ read7
│ │ └── mute-stream6
│ └─┬ utile2.1
│ ├── i3.4
│ └─┬ rimraf5.2
│ └─┬ glob@7.0
│ ├─┬ minimatch0
│ │ └─┬ brace-expansion1.3
│ │ └── balanced-match3.0
│ └── once3.3
└── semver@5.1.0
react-native安装成功 第一个react-native项目
o 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
运行
在当前目录下面多了一个ios的目录,里面新建一个project,HelloRN的项目。
在当前目录下会多出一个anroid的目录,里面是android项目的文件。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |