Flutter xcodebuild:错误:无法找到与提供的目标说明符匹配的目标(已解决)

Ber*_*ard 19 xcode ios-simulator flutter

我已经构建了一个 Flutter 应用程序。\n一切都工作正常,直到我尝试在物理设备上启动它。在努力寻找解决方案后,我将 Xcode 配置从调试更改为发布,现在我可以在物理设备上启动应用程序(通过运行 flutter run --profile)。\n但是现在,我无法成功启动它在模拟器上。\n我收到错误:

\n
xcodebuild: error: Unable to find a destination matching the provided destination specifier:\n            { id:C80BB36C-4498-4641-92D8-F69090A819A9 }\n
Run Code Online (Sandbox Code Playgroud)\n

当我插入设备并运行 flutter run --profile 时,他询问我想在哪个配置文件上运行该应用程序:

\n
[1]: iPhone de Bernard (00008110-0012642011B8801E)\n[2]: iPhone 14 (C80BB36C-4498-4641-92D8-F69090A819A9)\n[3]: macOS (macos)\n[4]: Chrome (chrome)\n
Run Code Online (Sandbox Code Playgroud)\n

当我尝试在 iPhone 14 的模拟器上从 Android Studio 运行该应用程序时,Flutter 在配置文件中建议的 iPhone 14 是找不到的。

\n

扑医生:

\n
[\xe2\x9c\x93] Flutter (Channel stable, 3.10.5, on macOS 13.4.1 22F82 darwin-arm64, locale fr-BE)\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 33.0.2)\n[\xe2\x9c\x93] Xcode - develop for iOS and macOS (Xcode 14.3.1)\n[\xe2\x9c\x93] Chrome - develop for the web\n[\xe2\x9c\x93] Android Studio (version 2022.2)\n[\xe2\x9c\x93] Connected device (3 available)\n[\xe2\x9c\x93] Network resources\n\n\xe2\x80\xa2 No issues found!\n
Run Code Online (Sandbox Code Playgroud)\n

和 Xcode 14.3.1

\n

非常感谢您的帮助!

\n

非常感谢 !

\n

Ber*_*ard 47

感谢这个线程

我的问题解决了。

简要地:

  1. 打开Xcode
  2. 单击运行程序(根)
  3. 单击构建设置
  4. 将“支持的平台”从 Iphoneos 更改为 iOS