【问题标题】:Flutter CocoaPods could not find compatible version: Cache and BetterPlayerFlutter CocoaPods 找不到兼容版本:Cache 和 BetterPlayer
【发布时间】:2021-11-19 00:49:10
【问题描述】:
我尝试使用 CocoaPods 在 iOS 上安装 Flutter 的 pod,但在启动时出现以下错误:
[!] CocoaPods could not find compatible version for pod "Cache":
In Podfile:
better_player (from ´.symlinks/plugins/better_player/ios´) was resolved to 0.0.1, which depends on
Cache (-> 6.0.0)
Specs satisfying the ´Cache (-> 6.0.0)´ dependency were found, but they required a higher minimum deployment target.
【问题讨论】:
标签:
ios
flutter
cocoapods
【解决方案1】:
请尝试以下步骤:
如果你有英特尔芯片
- 扑干净
- 将所有依赖项更新到 pubspec.yml 文件中的最新版本并执行“get pub”
- 转到您的 Podfile 并取消注释 #platform :ios, '9.0' 然后将版本更改为 10 platform :ios, '10.0' 或更高版本
- 通过终端进入 ios 文件夹并执行 'pod repo update'
- “pod 更新”或“pod 安装”
如果你有 M1 芯片
- 扑干净
- 将所有依赖项更新到 pubspec.yml 文件中的最新版本并执行“get pub”
- 转到您的 Podfile 并取消注释 #platform :ios, '9.0' 然后将版本更改为 10 platform :ios, '10.0' 或更高版本
- 通过终端进入 ios 文件夹并执行“arch -x86_64 pod repo update”
- 'arch -x86_64 pod update'或'arch -x86_64 pod install'