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

Flutter执行pod install报错:app_settings需更高最低部署目标

Flutter iOS端执行pod install时的版本兼容问题

执行pod install时触发如下错误:

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

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

执行日志详情

Pre-downloading: `FirebaseFirestore` from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `10.12.0`
cloud_firestore: Using user specified Firebase SDK version '10.12.0'
cloud_functions: Using user specified Firebase SDK version '10.12.0'
firebase_analytics: Using user specified Firebase SDK version '10.12.0'
firebase_auth: Using user specified Firebase SDK version '10.12.0'
firebase_core: Using user specified Firebase SDK version '10.12.0'
Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
Ignoring ffi-1.15.1 because its extensions are not built. Try: gem pristine ffi --version 1.15.1
Ignoring ffi-1.15.0 because its extensions are not built. Try: gem pristine ffi --version 1.15.0
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring nio4r-2.5.7 because its extensions are not built. Try: gem pristine nio4r --version 2.5.7
Warning: firebase_app_id_file.json file does not exist. This may cause issues in upload-symbols. If this error is unexpected, try running flutterfire configure again.
firebase_crashlytics: Using user specified Firebase SDK version '10.12.0'
firebase_dynamic_links: Using user specified Firebase SDK version '10.12.0'
firebase_messaging: Using user specified Firebase SDK version '10.12.0'
firebase_remote_config: Using user specified Firebase SDK version '10.12.0'
firebase_storage: Using user specified Firebase SDK version '10.12.0'
[!] CocoaPods could not find compatible versions for pod "app_settings":
  In Podfile:
    app_settings (from `.symlinks/plugins/app_settings/ios`)

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

当前环境配置

  • Podfile中的iOS最低版本:
    platform :ios, '11.0'
    
  • Flutter版本:
    Flutter 3.10.6 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision f468f3366c (3 weeks ago) • 2023-07-12 15:19:05 -0700
    Engine • revision cdbeda788a
    Tools • Dart 3.0.6 • DevTools 2.23.1
    

解决步骤

1. 提升iOS最低部署版本

  • 打开iOS目录下的Podfile,将platform :ios, '11.0'修改为插件要求的版本(比如platform :ios, '13.0',可查看app_settings插件的官方说明确认最低要求)
  • 同步修改Xcode项目配置:打开Xcode -> 选中项目 -> 目标 -> General -> Deployment Info,将iOS版本设置为和Podfile一致的数值

2. 清理缓存后重新执行

在iOS目录依次执行:

pod deintegrate
rm -rf Podfile.lock
rm -rf .symlinks
rm -rf Pods

回到Flutter项目根目录执行:

flutter clean
flutter pub get

最后再次进入iOS目录执行pod install

3. 降级插件版本(可选)

如果不想提升iOS版本,可在pubspec.yaml中指定兼容iOS 11的app_settings版本:

dependencies:
  app_settings: ^4.1.1 # 需确认该版本支持iOS 11

执行flutter pub get后重新运行pod install


内容的提问来源于stack exchange,提问作者Nils Reichardt

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.14 02:10:24