调用 -platform 时,DVTAssertions?(null) UDID 中的 deviceType 为 NULL

for*_*ear 6 xcode ios flutter

我正在 Flutter 中开发一个应用程序。我尝试构建该应用程序,但出现以下错误并且无法运行该应用程序。

xcodebuild[80270:554507]  DVTAssertions: Warning in
    /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks...
    Details:  (null) deviceType from <UDID> was NULL when -platform called.
    Object:   <DTDKMobileDeviceToken: <TOKEN>>
    Method:   -platform
    Thread:   <NSThread: <TOKEN>>{number = 2, name = (null)}
    Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
Run Code Online (Sandbox Code Playgroud)

小智 0

我目前面临同样的问题。我无法在 iPhone 13 模拟器上运行 IntelliJ 中的 Flutter 应用程序。但是,我可以直接从 XCode 运行该应用程序

我试图逃跑flutter clean,但没有帮助。


@Olle Kyrychenko 在这篇文章中建议执行以下步骤,以防 Flutter 应用程序无法在模拟器上运行。

  1. rm ios/Podfile

升级你的包:

  • pub upgrade
  • pub run

并更新你的 podfile:

  • cd ios
  • pod update

然后清理并运行:

  • flutter clean
  • flutter run

我没有测试上述内容,因为我有一些软件包目前无法升级,但这可能是问题的解决方案。

如果我能找到一些东西,我会更新我的帖子。