ios - Flutter Pod 安装失败 - 'Invalid `Podfile` 文件没有将 nil 隐式转换为字符串
问题描述
我克隆了可穿戴项目 https://github.com/sbis04/flutter_os_wear
运行 pod install... CocoaPods 的输出:↳</p>
[!] Invalid `Podfile` file: no implicit conversion of nil into String.
# from /Volumes/Storage/Bottle/Wearables/flutter_os_wear/ios/Podfile:57
# -------------------------------------------
# unless File.exist?(copied_framework_path)
> FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
# end
# -------------------------------------------
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/podfile.rb:301:in `rescue in block in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/podfile.rb:295:in `block in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/podfile.rb:50:in `instance_eval'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/podfile.rb:50:in `initialize'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/podfile.rb:293:in `new'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/podfile.rb:293:in `from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/podfile.rb:259:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/config.rb:200:in `podfile'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:150:in `verify_podfile_exists!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/install.rb:46:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
CocoaPods 的错误输出:↳ Ignoring ffi-1.12.2 because its extensions are not built。试试: gem pristine ffi --version 1.12.2
解决方案
尝试取消注释 ${PROJECT}/ios/Podfile 中的这一行 platform :ios, '8.0' 并将其设置为更高版本(如 9.0)。
推荐阅读
- javascript - 无法让 material-ui datepicker 工作
- c - 如何在不使用指针的情况下调试 C 中哈希表的二次探测实现?
- javascript - JavaScript 函数不起作用。帮助新手:\
- c++ - C++ 中的异常是否仅用于提高可读性?
- c++ - std::this_thread::yield 与 Linux 上的 sched_yield 有什么不同吗?
- javascript - 在 NodeJS 中从 MongoDB 获取元素并添加到要处理的列表/数组
- python - Keras Conv2D 解码器
- go - 我想删除句子中的空格
- javascript - 如何格式化 html 输入,使其从 0.00 开始?
- javascript - Axios CORS Vultr S3“无‘访问控制允许来源’”