RN项目环境搭建

##RN项目环境搭建
参考网址:https://facebook.github.io/react-native/docs/getting-started.html
###搭建步骤
一、安装
npm install brew
brew install node
brew install watchman
yarn add react-native-cli
react-native init 项目名称
cd 项目名称

-------- react-navigation参考地址 https://reactnavigation.org/docs/zh-Hans/getting-started.html

yarn add react-navigation
yarn add react-native-gesture-handler
react-native link react-native-gesture-handler
yarn add react-native-vector-icons
react-native link react-native-vector-icons

-------- react-navigation参考地址 -------

yarn add @ant-design/react-native

—安装地图插件

参考地址https://js.coach/react-native-amap3d?search=react-native-amap3d
1、npm i react-native-amap3d

2、你需要使用 CocoaPods,在 ios 目录下新建文件 Podfile:

  • 参考地址https://facebook.github.io/react-native/docs/integration-with-existing-apps#configuring-cocoapods-dependencies
    1》cd ios
    2》$ brew install cocoapods
    3》$ pod init
    4》修改Podfile文件内容改为(这部一次不能一次成功,需要多次尝试)
    image.png
    参考代码

image.png

3、pod install

猜你喜欢

转载自blog.csdn.net/qq_34484157/article/details/88867591