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

执行pod install报错:'Pods-Runner'存在appinvokesdk.xcframework框架冲突

解决Pod Install时appinvokesdk.xcframework框架冲突问题

问题原因

Paytm All-in-One SDK 1.1.7与项目中其他Flutter插件重复引入了同名的appinvokesdk.xcframework框架,导致CocoaPods整合时触发命名冲突报错。

解决方案

  • 定位重复依赖源
    打开项目ios目录下的Podfile.lock文件,搜索appinvokesdk关键字,找到所有包含该框架的依赖包,确认是哪个插件和Paytm SDK产生了冲突。

  • 移除重复框架
    在ios/Podfile的post_install脚本中添加逻辑,移除冲突插件中的重复框架。示例如下(将xxx_plugin替换为实际冲突的插件名称):

    post_install do |installer|
      installer.pods_project.targets.each do |target|
        flutter_additional_ios_build_settings(target)
        if target.name == 'xxx_plugin'
          target.frameworks_build_phase.files.each do |file|
            if file.file_display_name == 'appinvokesdk.xcframework'
              file.remove_from_project
            end
          end
        end
      end
    end
    
  • 彻底清理缓存后重装
    执行以下命令清理所有Pod缓存和已安装文件,再重新执行安装:

    cd ios
    pod deintegrate
    rm Podfile.lock
    rm -rf ~/Library/Caches/CocoaPods
    rm -rf Pods
    pod install
    
  • 调整插件版本
    检查pubspec.yaml中所有依赖的版本,尝试更新或降级冲突插件的版本,避免与Paytm SDK的依赖产生重叠。

内容的提问来源于stack exchange,提问作者Aman Kumar Gupta

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.17 04:25:27