Flutter - 无法在 iOS 模拟器上运行移动应用程序

问题描述 投票:0回答:1

我无法在 iOS 模拟器上运行 flutter 移动应用程序,放入终端后

fvm flutter run
我只看到空行。

当我使用“-v”运行时,它停在:

{
               "ignored" : false,
               "modelCode" : "MacBookPro16,2",
               "simulator" : false,
               "modelName" : "MacBook Pro",
               "operatingSystemVersion" : "14.0 (23A344)",
               "identifier" : "4117DDB0-D402-5B75-9AEC-C5D6BCD3AF8E",
               "platform" : "com.apple.platform.macosx",
               "architecture" : "x86_64h",
               "interface" : "usb",
               "available" : true,
               "name" : "My Mac",
               "modelUTI" : "com.apple.macbookpro-13-retina-four-usb-ports-2020"
             },
             {
               "simulator" : true,
               "operatingSystemVersion" : "17.0 (21A328)",
               "available" : true,
               "platform" : "com.apple.platform.iphonesimulator",
               "modelCode" : "iPad13,17",
               "identifier" : "ED28F503-BF45-423F-9517-559398CB41FB",
               "architecture" : "x86_64",
               "modelUTI" : "com.apple.ipad-air5-1",
               "modelName" : "iPad Air (5th generation)",
               "name" : "iPad Air (5th generation)",
               "ignored" : false
             },
             {
               "simulator" : true,
               "operatingSystemVersion" : "17.0 (21A328)",
               "available" : true,
               "platform" : "com.apple.platform.iphonesimulator",
               "modelCode" : "iPad13,18",
               "identifier" : "85A83F5E-65BF-4A34-88E1-38F7546DE43D",
               "architecture" : "x86_64",
               "modelUTI" : "com.apple.ipad-10-1",
               "modelName" : "iPad (10th generation)",
               "name" : "iPad (10th generation)",
               "ignored" : false
             }
           ]

'flutter doctor -v' 显示

Could not parse java version from: 

If there is a version please look for an existing bug https://github.com/flutter/flutter/issues/ and if one does not exist file a new issue.
[✓] Flutter (Channel stable, 3.13.1, on macOS 14.0 23A344 darwin-x64, locale en-PL)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ✗ Could not determine java version
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.83.1)
[✓] VS Code (version 1.73.0)
Scanning for devices is taking a long time...

设备:Macbook - Sonoma 14.0 - Intel Core i5

我和我的大学认为它与i5有关,但拥有M1的人也有同样的错误。

目前我需要在运行应用程序之前重新启动 MacBook。真的很烦人。

flutter ios-simulator simulator macbookpro
1个回答
0
投票

试试这个:

  1. 打开项目终端
  2. cd ios
  3. 豆荚分解
  4. pod 仓库更新
  5. 吊舱安装
© www.soinside.com 2019 - 2024. All rights reserved.