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

升级Xcode 15.0和iOS 17后无法执行flutter run --release求助

解决Xcode 15.0 + iOS 17升级后Flutter无法执行flutter run --release的问题

报错信息:

Unable to locate DeviceSupport directory with suffix 'DeveloperDiskImage.dmg'. This probably means you don't have Xcode installed, you will need to launch the app manually and logging output will not be shown! Could not run build/ios/iphoneos/Runner.app on 00008110-0018494802D0401E. Try launching Xcode and selecting "Product > Run" to fix the problem: open ios/Runner.xcworkspace

解决方案:

  • 通过Xcode完成首次部署

    1. 终端执行open ios/Runner.xcworkspace打开项目的iOS工作区
    2. 在Xcode顶部选择你的iOS设备,点击Product > Run,让Xcode自动处理设备适配和文件部署
    3. 等Xcode成功运行应用后,回到终端重新执行flutter run --release,大部分情况能解决问题
  • 手动检查/添加DeviceSupport文件

    1. 打开Finder,前往路径:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
    2. 查看是否存在对应iOS 17版本的文件夹(比如17.0),如果没有:
      • 从其他正常运行Xcode 15的设备上复制该文件夹,或者重新安装Xcode补全缺失文件
    3. 复制完成后重启Xcode和终端,再尝试执行flutter run --release
  • 升级Flutter到适配版本

    1. 终端执行flutter upgrade,将Flutter升级到3.13及以上的稳定版(该版本已适配Xcode 15)
    2. 执行flutter clean清理旧构建缓存,再重新构建:flutter build ios --release
    3. 最后运行flutter run --release
  • 手动安装应用包
    如果上述方法都无效,可直接手动部署:

    1. 先构建release包:flutter build ios --release
    2. 打开Xcode,通过Window > Devices and Simulators找到你的设备
    3. 将build/ios/iphoneos/Runner.app拖到设备的"Installed Apps"列表中完成安装
    4. 直接在设备上打开应用即可(终端无法查看日志,但应用能正常运行)

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.10 17:38:34