美文网首页
React-Native环境搭建

React-Native环境搭建

作者: 贾里 | 来源:发表于2017-05-28 17:56 被阅读16次

React-Native官方
https://facebook.github.io/react-native/docs/getting-started.html
1.安装nodejs
http://www.jianshu.com/p/37d8436fcf79

2.安装python2
python地址:https://www.python.org/

python.png

3.配置python环境变量
和jdk环境变量配置类似

Paste_Image.png

在cmd中输入python查看版本信息,验证是否安装成功。

4.安装react-native

npm install -g react-native-cli

5.配置AndroidStudio
AndroidStuido最新版本,sdk最少在23以上。
配置Android_HOME环境变量:

Paste_Image.png

6.配置模拟器
最好配置模拟器加速

7.初始化

react-native init first

8.启动

cd first
react-native start

9.发布运行到模拟器

cd first
react-native run-android

刷新页面可以按R键
或者模拟器带有菜单按钮的
模拟器选择:
hdpi
WVGA800

相关文章

网友评论

      本文标题:React-Native环境搭建

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