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

执行pod install报错:'Pods-Runner'含静态链接依赖及UUID异常

问题解决:Pod Install冲突与Xcode UUID错误

问题现象

1. Pod静态库依赖冲突

pod install
Analyzing dependencies
Downloading dependencies
Installing DKImagePickerController (4.3.4)
Installing DKPhotoGallery (0.0.17)
Installing FMDB (2.7.5)
Installing Flutter (1.0.0)
Installing SDWebImage (5.18.8)
Installing SwiftyGif (5.4.4)
Installing TensorFlowLiteC (2.14.0)
Installing TensorFlowLiteSwift (2.14.0)
Installing ffmpeg-kit-ios-https (6.0)
Installing ffmpeg_kit_flutter (6.0.3)
Installing file_picker (0.0.1)
Installing image_picker_ios (0.0.1)
Installing path_provider_foundation (0.0.1)
Installing photo_manager (1.0.0)
Installing shared_preferences_foundation (0.0.1)
Installing sqflite (0.0.3)
Installing tflite_flutter (0.1.0)
Installing video_player_avfoundation (0.0.1)
[!] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (TensorFlowLiteSwift)

2. Xcode项目UUID引用错误

[!] <XCBuildConfiguration name=Debug UUID=331C8088294A63A400263BE5> 尝试使用未知UUID AE0B7B92F70575B8D7E0D07E 初始化对象(属性:base_configuration_reference),该UUID将被丢弃,此问题可能由合并操作导致。
[!] <XCBuildConfiguration name=Release UUID=331C8089294A63A400263BE5> 尝试使用未知UUID 89B67EB44CE7B6631473024E 初始化对象(属性:base_configuration_reference),该UUID将被丢弃,此问题可能由合并操作导致。
[!] <XCBuildConfiguration name=Profile UUID=331C808A294A63A400263BE5> 尝试使用未知UUID 640959BDD8F10B91D80A66BE 初始化对象(属性:base_configuration_reference),该UUID将被丢弃,此问题可能由合并操作导致。
[!] <PBXNativeTarget name=RunnerTests UUID=331C8080294A63A400263BE5> 尝试使用未知UUID 331C807E294A63A400263BE5 初始化对象(属性:build_phases),该UUID将被丢弃,此问题可能由合并操作导致。

已尝试rm -rf ios/Pod、flutter clean、flutter build,均无效。


解决方案

一、修复Xcode UUID引用错误(合并导致的项目文件损坏)

方法1:重新生成iOS项目配置(推荐)

  • 备份ios目录下的Podfile和Podfile.lock(若有自定义配置)
  • 删除整个ios目录
  • 执行命令重新生成iOS项目:
    flutter create --platforms ios .
    
  • 将备份的Podfile内容合并到新生成的Podfile中(保留flutter默认配置)
  • 进入ios目录执行pod install

方法2:手动修复project.pbxproj文件

  • 用文本编辑器打开ios/Runner.xcodeproj/project.pbxproj
  • 搜索报错中的所有未知UUID(如AE0B7B92F70575B8D7E0D07E),删除包含这些UUID的行
  • 搜索RunnerTests的build_phases配置,移除引用未知UUID的条目
  • 保存文件后重新执行pod install

二、解决TensorFlowLiteSwift静态库冲突

方法1:在Podfile中添加兼容配置

在ios目录的Podfile中插入以下代码:

pre_install do |installer|
  installer.pod_targets.each do |pod|
    if pod.name == 'TensorFlowLiteSwift'
      pod.build_configurations.each do |config|
        config.build_settings['OTHER_LDFLAGS'] = ['-ObjC']
      end
    end
  end
end

执行pod install重新安装依赖。

方法2:升级或替换依赖

  • 升级tflite_flutter到最新版本,新版本可能修复了静态库依赖问题
  • 若项目允许,替换为纯C版本的TensorFlowLiteC,避免Swift静态库冲突

内容的提问来源于stack exchange,提问作者paul xiong

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.03 11:30:08