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

Flutter升级至2.8.x后iOS15模拟器运行失败,遇mobileffmpeg权限错误

Flutter 2.8.x 升级后 iOS 15 模拟器构建错误修复

问题根源

mobile-ffmpeg-https-xcframeworks.sh脚本缺失可执行权限,导致PhaseScriptExecution失败,进而触发'mobileffmpeg/LogDelegate.h' file not found和Swift编译错误。

修复步骤

  • 修复脚本权限
    打开终端,执行以下命令为脚本添加可执行权限:

    chmod -R +x ios/Pods/mobile-ffmpeg-https/
    

    或者进入对应目录单独授权:

    cd ios/Pods/mobile-ffmpeg-https/
    chmod +x mobile-ffmpeg-https-xcframeworks.sh
    
  • 彻底清理并重新构建

    1. 执行flutter clean
    2. 删除iOS目录下的Podfile.lock
    3. 进入iOS目录,依次执行:
      pod deintegrate
      pod install
      
    4. 回到项目根目录执行flutter pub get
    5. 重启Xcode,按Cmd+Shift+K清理缓存后重新构建
  • 检查依赖版本兼容性
    确认pubspec.yaml中mobile_ffmpeg依赖版本与Flutter 2.8.x兼容(推荐使用0.4.0及以上版本),避免锁定旧版本导致适配问题。

  • 清理Xcode DerivedData(可选)
    如果上述步骤无效,删除Xcode缓存数据:

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

内容的提问来源于stack exchange,提问作者Khyati Modi

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.12 01:20:43