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

Flutter GoogleMaps与CocoaPods兼容报错:需更高最低部署目标

解决CocoaPods GoogleMaps依赖兼容问题
  • 提升iOS项目最低部署目标
    打开iOS目录下的Podfile,找到platform :ios, 'x.x'这一行,把版本号改成13.0及以上(GoogleMaps 8.4+版本要求最低iOS 13.0),比如改成platform :ios, '13.0'。
    同时打开iOS项目的Runner.xcworkspace,在项目设置里把Deployment Target也改成对应的13.0版本,保证和Podfile设置一致。

  • 清理CocoaPods缓存后重新安装
    依次执行以下命令清理缓存:

    pod deintegrate
    pod cache clean --all
    rm Podfile.lock
    

    完成后再执行pod install。

  • (可选)指定插件稳定版本
    如果上面的步骤没解决问题,可以在pubspec.yaml里明确指定google_maps_flutter_ios的稳定版本,比如:

    google_maps_flutter_ios: ^2.7.0
    

    执行flutter pub get拉取依赖后,回到iOS目录重新执行pod install。

内容的提问来源于stack exchange,提问作者Youssouf Hassan Moussa

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.24 11:17:01