flutter iOS模拟器-连接到VM服务所需的时间比预期长

wnavrhmk  于 2023-02-13  发布在  Flutter
关注(0)|答案(1)|浏览(314)

当我尝试在iOS模拟器上运行我的应用程序时,我收到此错误:

Launching lib/main.dart on iPhone 14 Pro Max in debug mode...
Running Xcode build...                                                  
 └─Compiling, linking and signing...                         9,2s
Xcode build done.                                           27,9s
Connecting to the VM Service is taking longer than expected...
Still attempting to connect to the VM Service...
If you do NOT see the Flutter application running, it might have crashed. The device logs (e.g. from adb or XCode) might have more details.
If you do see the Flutter application running on the device, try re-running with --host-vmservice-port to use a specific port known to be available.

在终端中的Xcode build done. 27,9s打印结束时,App在iOS模拟器中打开几毫秒,但立即关闭,并打开Xcode的崩溃屏幕。
下面是我的flutter doctor -v

[✓] Flutter (Channel master, 3.8.0-9.0.pre.18, on macOS 13.2 22D49 darwin-arm64, locale pt-BR)
    • Flutter version 3.8.0-9.0.pre.18 on channel master at /Users/rafael/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f945ad99c3 (55 minutes ago), 2023-02-10 00:05:44 +0100
    • Engine revision 40e17fb524
    • Dart version 3.0.0 (build 3.0.0-218.0.dev)
    • DevTools version 2.21.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc2)
    • Android SDK at /Users/rafael/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2020.3)
    • 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 11.0.10+0-b96-7281165)

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

[✓] Connected device (3 available)
    • iPhone 14 Pro Max (mobile) • 49BFE69F-8CDD-4726-A6A4-60AC1E87E6E9 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
    • macOS (desktop)            • macos                                • darwin-arm64   • macOS 13.2 22D49 darwin-arm64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 109.0.5414.119

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
kcugc4gi

kcugc4gi1#

我解决了这个问题,我在应用程序中有一个软件包,有pub google_mobile_ads在其.yaml,并且由于我没有在此应用程序中实施广告我没有在AndroidManifest.xmlInfo.plist配置必要的项目.

相关问题