请指定“更高的最低部署目标”依赖项

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

我安装了 Flutter 3.16.0 SDK,并在配置后开始安装必要的软件包,例如

connectivity_plus
当我尝试在 iPhone 上运行该应用程序时,我遇到了这个问题:

[!] CocoaPods could not find compatible versions for pod "connectivity_plus":
  In Podfile:
    connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)

Specs satisfying the `connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)` dependency were found, but they required a higher minimum deployment target.
ios flutter cocoapods
1个回答
0
投票

尝试了一些类似的方法后,但没有成功。

  • flutter clean
  • rm -rf Podfile.lock
  • rm -rf Pods
  • pod install --repo-update
  • 更新
    Podfile
    并设置
    platform :ios, '8.0'
    或 9.0 或 10.0 或 11.0

我开始担心,但后来我仔细阅读了错误并开始逐字理解它,我发现给我错误的包的最低平台版本与我的平台版本不匹配

Podfile
和此时我不知道包的最低平台版本是什么,然后我从这部分错误中得到了提示

Specs satisfying the `connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)` dependency were found, but they required a higher minimum deployment target.

因此,继续打开

ios/.symlinks/plugins/connectivity_plus/ios/connectivity_plus.podspec
文件,看到其中定义了
s.platform = :ios, '12.0'
,所以我得到了答案,这是我应该在我的
Podfile
中使用的最低平台版本。

TLDR 检查你的

Podfile
并查找这一行
platform :ios,
,之后出现的内容是我的情况下的最低版本,我尝试了 8.0、9.0、10.0 和 11.0,但它仍然没有解决我的问题,所以我打开了包
podspec
文件它应该位于
ios/.symlinks/plugins/package_name/ios/package_name.podspec
,然后从那里检查最低版本是什么,并在您的
Podfile

中使用相同的最低版本

这就是幸福的结局😅

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