「react-native」【记】在真机(ios和安卓)上运行example项目AwesomeProject时遇到的问题
- 问题一:Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.Please try again manually: "cd ./AwesomeProject/ios && pod install"
- 问题二:The app identifier "org.reactjs.native.example.AwesomeProject" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.
- 问题三:ios真机调试的时候,跳出提示框“未受信任的……开发者”
- 问题四:开启小米开发者调试功能
- 问题五:安卓(小米11)真机调试的时候,项目运行报错“Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.”
问题一:Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.Please try again manually: “cd ./AwesomeProject/ios && pod install”
学习react-native,根据官方文档配置好环境后,新建项目
npx react-native init AwesomeProject
时,报错,如图所示
根据命令提示输入
cd ./AwesomeProject/ios
pod install
然而还是报错,如图所示
找了网上的帖子,并没有找到合适的解决方法,于是我按照官方文档中下载CocoaPods
brew install cocoapods
结果提示这玩意儿已经下载过了