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

升级iOS17与Xcode15后,Flutter无法在AS/VSCode运行真机(Xcode可运行)

问题描述

错误信息

原始错误输出:

Could not run build/ios/iphoneos/Runner.app on <iphonedevice>.
Try launching Xcode and selecting "Product > Run" to fix the problem:
  open ios/Runner.xcworkspace

中文说明:无法在目标iPhone设备上运行编译后的Runner.app,提示建议启动Xcode并通过「产品>运行」尝试修复,可执行命令open ios/Runner.xcworkspace打开项目的Xcode工作区。

问题背景

  • 项目原本可在iPhone真机正常运行,升级iOS 17和Xcode 15后出现该故障
  • 项目能在Xcode中正常运行,但无法通过Android Studio或VSCode启动运行

Flutter doctor -v 检测结果

[✓] Flutter (Channel stable, 3.7.12, on macOS 14.0 23A344 darwin-arm64, locale
    zh-Hant-TW)
    • Flutter version 3.7.12 on channel stable at
      /Users/davis_ho/fvm/versions/3.7.12
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4d9e56e694 (6 months ago), 2023-04-17 21:47:46 -0400
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/davis_ho/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.82.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.72.0

已尝试的解决方法

  • 重新安装Flutter
  • 在Xcode中取消配对并重新配对iPhone设备
  • 卸载设备上的应用
  • 在iPhone的「VPN与设备管理」中信任开发者证书

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.09 19:32:21