ReactNative环境配置

来源:互联网 发布:mac标点 编辑:程序博客网 时间:2024/06/08 15:19

接触RN有一段时间的了,但是现在电脑换掉了,所以从新进行配置一下,这段时间坚持每日已更新吧。争取早日学会RN!!!

本人现有环境windows10+已有Android的相关环境

1.C++环境安装 本人安装了VS2013

2.git的安装

3.node.js的安装(选择windows)

以上软件基本安装成功

在git-cmd.exe 中执行

npm config set registry https://registry.npm.taobao.org --globalnpm config set disturl https://npm.taobao.org/dist --global
然后在github 上下载facebook的react-native-master文件 进入react-native-cli文件执行
npm install -g react-native-cli
然后创建文件
react-native init 自己项目名运行包
react-native start
然后在Android上运行
react-native run-android
 


错误:

1.SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

在环境变量中添加AndroidHome 给他相应的SDK路径即可

2.A problem occurred configuring project ':app'.
> failed to find Build Tools revision 23.0.1

更新SDK 添加23.0.1即可

然后就BUILD SUCCESSFUL
相关软件和安装包百度云链接:链接:http://pan.baidu.com/s/1pLfCyvD 密码:38jk
0 0
原创粉丝点击