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

Flutter项目从GitHub下载后在新MacBook调试时安装失败求助

解决Flutter应用新Mac调试时无法加载App.framework Info.plist的安装失败问题

问题场景

已将Flutter开发的应用发布至AppStore,更换新MacBook后从GitHub下载项目调试,出现应用安装失败,提示无法加载App.framework中的Info.plist。错误日志如下:

ProcessException: Process exited abnormally with exit code 1:
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
App installation failed: Unable to Install “Uscan”
Please try again later.
Failed to load Info.plist from bundle at path
/Users/umitkar/Library/Developer/CoreSimulator/Devices/6DF53204-2EE0-4E2C-AAE2-144ECAA4FE8D/data/Library/Caches/com.apple.mobile.installd.staging/temp.bwXW2T/extracted/Runner.app/Frameworks/App.framework; Extra info about
"/Users/umitkar/Library/Developer/CoreSimulator/Devices/6DF53204-2EE0-4E2C-AAE2-144ECAA4FE8D/data/Library/Caches/com.apple.mobile.installd.staging/temp.bwXW2T/extracted/Runner.app/Frameworks/App.framework/Info.plist": dev=16777230 ino=6517025 mode=0100644 nlink=1 uid=501 gid=20 rdev=0 size=300 atime=1733260998.631274 mtime=1733175480.000000 ctime=1733260998.622615
birthtime=1733175480.000000 blksize=4096 blocks=8 flags=0x0 firstBytes={length = 4, bytes = 0x3c3f786d} ACL= extendedAttributes={
"com.apple.provenance" = {length = 11, bytes = 0x0102000a9130a7e079331c};
} keyCount=1 keySample={ flutter.assets }
Underlying error (domain=IXUserPresentableErrorDomain, code=1):
Unable to Install “Uscan”
Please try again later.
Command: /usr/bin/arch -arm64e xcrun simctl install 6DF53204-2EE0-4E2C-AAE2-144ECAA4FE8D /Users/umitkar/dev/flutter/uscan/build/ios/iphonesimulator/Runner.app

解决方案

  • 清理构建缓存与依赖

    1. 执行Flutter项目清理:
      flutter clean
      
    2. 进入iOS目录清理Pods和本地构建文件:
      cd ios
      pod deintegrate
      rm -rf Podfile.lock Build
      pod install
      
    3. 返回项目根目录重新构建模拟器版本:
      flutter build ios --simulator
      
  • 验证Info.plist完整性
    找到构建产物中的App.framework/Info.plist(路径参考日志中的路径),用文本编辑器打开确认是完整的XML格式,没有损坏或缺失必填字段(如CFBundleIdentifier、CFBundleShortVersionString等)。如果本地项目配置有差异,对比旧Mac上的项目配置进行修正。

  • 重置iOS模拟器
    打开Xcode,依次点击Window > Devices and Simulators,选中报错的模拟器,右键选择Erase All Content and Settings,重置完成后再尝试安装应用。

  • 检查版本兼容性
    执行flutter doctor检查Flutter与Xcode版本是否兼容,确保新Mac上的Xcode版本和旧Mac一致,或符合当前Flutter版本的官方要求。如有不兼容,升级或降级对应工具版本。

  • 修复文件权限
    错误日志显示文件权限相关信息,尝试修改项目目录的权限:

    sudo chown -R $(whoami):staff /Users/umitkar/dev/flutter/uscan
    

    确保构建生成的文件无权限限制,让模拟器可以正常读取Info.plist。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.15 17:53:11