Flutter CocoaPods 找不到兼容版本:Cache 和 BetterPlayer

Luc*_*_54 4 ios cocoapods flutter

我尝试使用 CocoaPods 在 iOS 上安装 Flutter 的 pod,但开始时出现以下错误:

\n
[!] CocoaPods could not find compatible version for pod "Cache":\n  In Podfile:\n    better_player (from \xc2\xb4.symlinks/plugins/better_player/ios\xc2\xb4) was resolved to 0.0.1, which depends on\n      Cache (-> 6.0.0)\n\nSpecs satisfying the \xc2\xb4Cache (-> 6.0.0)\xc2\xb4 dependency were found, but they required a higher minimum deployment target.\n
Run Code Online (Sandbox Code Playgroud)\n

Tus*_*iya 7

请尝试以下步骤:

如果你有英特尔芯片

  1. 扑干净
  2. 将 pubspec.yml 文件中的所有依赖项更新为最新版本并执行“get pub”
  3. 转到您的 Podfile 并取消注释 #platform :ios, '9.0' 然后将版本更改为 10 platform :ios, '10.0' 或更高版本
  4. 通过终端转到 ios 文件夹并执行“pod repo update”
  5. “pod 更新”或“pod 安装”

如果你有M1芯片

  1. 扑干净
  2. 将 pubspec.yml 文件中的所有依赖项更新为最新版本并执行“get pub”
  3. 转到您的 Podfile 并取消注释 #platform :ios, '9.0' 然后将版本更改为 10 platform :ios, '10.0' 或更高版本
  4. 通过终端转到 ios 文件夹并执行“arch -x86_64 pod repo update”
  5. 'arch -x86_64 pod update' 或 'arch -x86_64 pod install'