# react-native **Repository Path**: luchaoding/react-native ## Basic Information - **Project Name**: react-native - **Description**: 对react-native的初步了解到深入 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-11-03 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # react-native #### 项目介绍 对react-native的初步了解到深入 ### 学会react 可以达到 lean once, write anywhere 虽然rn 可以开发各终端,但是也是有痛点的,就是需要稍微了解不同平台的差一点解决它。 ### 环境的搭建 1. xcode-select --install 检查xcode版本是安装完毕的。 2. 安装homebrew mac的包管理器 3. watchman flow watchman facebook 开源的一个项目用来监控文件的改变,并记录。 flow 静态类型查查器,用来找出javascript类型错误。 git pkg-config coiro libpng jpeg gitlib mongodb brew install 上面这些内容 4. nvm 安装 nvm install nvm alias default 版本 设置为默认版本 最低版本 4.2.3 5. cnpm 6. https://reactnative.cn/ 7. cnpm i react-native-cli@0.1.10 -g 8. react-native init imooc rn 中多个单词要用驼峰标识 生成后会有两段提示 To run your app on iOS: react-native run-ios Could not find iPhone X simulator https://blog.csdn.net/enjoyyulinli123/article/details/79873658 react-native run-ios --help react-native run-ios --simulator "iPhone 6s" command 1 2 3 4调整模拟器尺寸 Print: Entry, ":CFBundleIdentifier", Does Not Exist https://blog.csdn.net/SummerCloudXT/article/details/80795465 https://www.aliyun.com/jiaocheng/353496.html https://github.com/google/glog/archive/v0.3.4.tar.gz https://github.com/google/double-conversion/archive/v1.1.5.tar.gz https://github.com/react-native-community/boost-for-react-native/releases/download/v1.63.0-0/boost_1_63_0.tar.gz https://github.com/facebook/folly/archive/v2016.10.31.00.tar.gz 如果按照教程按照的react-native-cli init 后是无法启动的请安装最新的react-native-cli npm init -y npm i react-native-cli -S script “imooc”:"react-native init imooc --version 0.44.3" 如何跑ios To run your app on Android: 如何跑android 9. 项目目录结构 App.js app.json ios package-lock.json android index.js node_modules package.json 10. 模拟器如何退出到桌面 ommand+shift+h