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

Xcode 16搭配Flutter 3.27.1编译报错:找不到GoogleUtilitiesComponents框架

解决Xcode编译时"framework not found GoogleUtilitiesComponents"错误

以下是针对Xcode 16、Flutter 3.27.1、macOS 15.5环境下的解决步骤:

  • 清理Flutter与CocoaPods缓存
    依次执行以下命令:

    flutter clean
    rm -rf ios/Pods ios/Podfile.lock
    rm -rf ~/Library/Caches/CocoaPods
    rm -rf ios/.symlinks
    rm -rf ios/Flutter/Flutter.framework ios/Flutter/Flutter.podspec
    
  • 重新拉取依赖并安装Pods

    flutter pub get
    cd ios
    pod install --repo-update
    
  • 检查并调整Podfile依赖
    打开iOS目录下的Podfile,确认是否存在重复或错误的GoogleUtilitiesComponents引用。若Pods目录中无该框架,可手动指定GoogleUtilities版本,添加如下代码后重新执行pod install:

    pod 'GoogleUtilities', '~> 7.11.0'
    
  • 修正Xcode的Framework搜索路径
    打开iOS项目的Xcode工程,进入目标项目的Build Settings,找到Framework Search Paths,添加或确保包含以下路径并设置为递归(recursive):

    • $(inherited)
    • $(PROJECT_DIR)/Pods/GoogleUtilities/Frameworks
  • 清理Xcode构建缓存并重启
    关闭Xcode,执行命令删除DerivedData:

    rm -rf ~/Library/Developer/Xcode/DerivedData
    

    重新打开Xcode,选择Product > Clean Build Folder,再尝试编译项目

内容的提问来源于stack exchange,提问作者Chandika Gunawardhana

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.13 02:25:56