You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter 3.16.0 iOS运行报错:connectivity_plus需更高最低部署目标

解决CocoaPods与connectivity_plus的版本兼容问题

问题重现

[!] 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项目最低部署目标版本低于connectivity_plus插件的要求,导致CocoaPods无法匹配到兼容的Pod版本。

解决方案

  • 步骤1:修改iOS部署目标版本
    打开项目的ios/Podfile文件,找到开头的platform :ios, 'x.x'行,将版本号修改为connectivity_plus要求的最低版本(当前该插件通常要求至少12.0),修改后示例:

    platform :ios, '12.0'
    
  • 步骤2:清理并重新安装Pods
    在终端依次执行以下命令:

    # 进入iOS项目目录
    cd ios
    # 清理旧的Pods配置
    pod deintegrate
    # 重新安装依赖
    pod install
    
  • 步骤3:(可选)清除Flutter缓存并重同步
    如果上述步骤无效,先执行以下命令,再重复步骤2:

    # 清除Flutter本地缓存
    flutter clean
    # 重新获取Flutter项目依赖
    flutter pub get
    

内容的提问来源于stack exchange,提问作者Ali Hussnain - alichampion

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.05 01:32:37