我的xcode_backend.dart文件在尝试运行我的应用程序时出错

pnwntuvh  于 12个月前  发布在  其他
关注(0)|答案(1)|浏览(200)

当尝试运行我的flutter程序时,我得到以下错误:

Unhandled exception:
    Null check operator used on a null value
    #0      Context.embedFlutterFrameworks
    (file:///Users/mustafa/flutter/packages/flutter_tools/bin/xcode_backend.dart:235:68)
    #1      Context.run
    (file:///Users/mustafa/flutter/packages/flutter_tools/bin/xcode_backend.dart:59:9)
    #2      main (file:///Users/mustafa/flutter/packages/flutter_tools/bin/xcode_backend.dart:17:5)
    #3      _delayEntrypointInvocation.<anonymous closure>
    (dart:isolate-patch/isolate_patch.dart:295:33)
    #4      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
    Command PhaseScriptExecution failed with a nonzero exit code

字符串
Flutter Doctor详细信息:

[✓] Flutter (Channel master, 3.16.0-6.0.pre.46, on macOS 14.0 23A344 darwin-arm64, locale en-TZ)
    • Flutter version 3.16.0-6.0.pre.46 on channel master at /Users/mustafa/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6dce1425e0 (43 minutes ago), 2023-10-09 09:10:25 -0400
    • Engine revision 664f5e8338
    • Dart version 3.3.0 (build 3.3.0-1.0.dev)
    • DevTools version 2.28.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/mustafa/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • 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.6b829.9-10027231)
    • 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.13.0

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

[✓] Android Studio (version 2022.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 17.0.6+0-17.0.6b829.9-10027231)

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

[✓] Connected device (3 available)
    • iPhone 15 Pro (mobile) • A78DD306-C05C-4547-A0E5-B87FBA654D3F • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 14.0
      23A344 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome
      117.0.5938.149


网络资源所有预期的网络资源都可用。
·未发现问题!
我使用的是运行在索诺马14.0和Xcode 15.0上的MacBook Air M1。我已经尝试清除Flutter缓存,更新Flutter和重新安装podfile,但错误仍然存在。

rqenqsqc

rqenqsqc1#

我已经遇到这个问题有一段时间了。降级到Flutter 3. 13. 9解决了这个问题:

flutter downgrade
flutter clean && flutter pub get
pod repo update && pod install
flutter run

字符串
也许应该向Flutter GitHub报告该错误。

相关问题