2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
RN builds development environment
rvm installation 3.2.2
brew install node@18
brew install watchman
# 使用nrm工具切换淘宝源
npx nrm use taobao
# 如果之后需要切换回官方源可使用
npx nrm use npm
npm install -g yarn
brew install cocoapods
npm uninstall -g react-native-cli @react-native-community/cli
npx react-native@latest init AwesomeProject
cd AwesomeProjectcd
# 如果没有node_modules文件夹
npm install
cd ios
pod install
Because the project generated by rn always reports glog errors, you need to use the glog source code to overwrite the glog folder in the project Pods
Download glog source code to cover glog in the project
If it still reports Command PhaseScriptExecution failed with a nonzero exit code, check this
No bundle URL present
To run in the root index.js directory
npm start