Flutter CocoaPods 找不到 pod OneSignalXCFramework 的兼容版本

问题描述 投票:0回答:2

运行时

pod install
出现以下错误

[!] CocoaPods could not find compatible versions for pod "OneSignalXCFramework":
  In Podfile:
    onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`) was resolved to 3.2.7, which depends on
      OneSignalXCFramework (= 3.9.1)

None of your spec sources contain a spec satisfying the dependency: `OneSignalXCFramework (= 3.9.1)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.
flutter cocoapods
2个回答
35
投票

尝试运行以下命令

cd ios/
pod repo update
rm -rf Podfile.lock Pods
pod install

0
投票

如果您最近更新了 Onesignal 版本,您可能需要检查 pod 文件,以确保 onesignal 版本与您正在使用的版本的 Onesignal 文档中的内容一致。

pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0'

检查 PodFile 中上面的这一行并确保版本匹配。

© www.soinside.com 2019 - 2024. All rights reserved.