- (React Native新创建的项目无法运行)Unable t
- xcrun: error: unable to find uti
- unable to load script from asset
- react-native 学习记录
- React-Native Android真机测试 -unable
- react-native开发:iOS报错--Print: Ent
- React Native 新创建的项目react-native
- How to resoleve unable to load
- xcrun: error: unable to find uti
- React Native跑项目提示:unable to load
最新创建的React Native项目,对于ios需要Pod管理工具
最开始可以直接使用React Native的官方推荐的Pod安装方法:
https://reactnative.cn/docs/getting-started.html

安装过程中,可能会出现如下问题:
pod[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
解决方案:
pod repo add master https://github.com/CocoaPods/Specs.git
然后提示执行
pod setup
如果出现
pod[!] The `master` repo is not a git repo.
进入/users/你的用户名/.cocoapods/repos,删除master文件夹然后执行
(注意此处的.cocoapods隐藏文件夹)
pod setup
如果是安装多个Xcdoe,还需要选择Xcode的路径
sudo xcode-select -switch /Applications/Xcode.app/
在终端里输入下方命令可以知道Xcode的路径:
xcode-select -p
最后需要注意的是用.xcworkspace的文件打开iOS项目:

网友评论