flutter NSBundle: principal class is nil because all fallbacks have failed (Add-to-app, IOS 18, XCode 16 Beta 1)

jobtbby3  于 4个月前  发布在  Flutter
关注(0)|答案(2)|浏览(61)

重现步骤

在测试XCode 16 Beta 1和iOS 18模拟器时。

  1. 遵循以下步骤将Flutter模块添加到iOS应用中:https://docs.flutter.dev/add-to-app/ios/project-setup(我们使用了选项A-使用CocoaPods和Flutter SDK嵌入)
  2. 使用XCODE Beta 16.0运行iOS应用-iOS 18模拟器

预期结果

应用程序运行无错误,我们怀疑这可能与IOS 18模拟器出现错误有关,但我们不确定。

实际结果

两者都显示以下错误:
稳定频道,3.22.2,
主频道,3.23.0-13.0.pre.218

NSBundle file:///Library/Developer/CoreSimulator/Volumes/iOS_22A5282m/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS%2018.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/MetalTools.framework/ principal class is nil because all fallbacks have failed

flutter: The Dart VM service is listening on http://127.0.0.1:53320/KMcgPRKOfzg=/

Unable to create bundle at URL (file:///Library/Developer/CoreSimulator/Volumes/iOS_22A5282m/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS%2018.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreServices/SystemVersion.bundle): does not exist or not a directory (0)

Unable to create bundle at URL (file:///Library/Developer/CoreSimulator/Volumes/iOS_22A5282m/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS%2018.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreServices/SystemVersion.bundle): does not exist or not a directory (0)

Unable to create bundle at URL (file:///Library/Developer/CoreSimulator/Volumes/iOS_22A5282m/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS%2018.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreServices/SystemVersion.bundle): does not exist or not a directory (0)

代码示例

代码示例

[Paste your code here]

截图或视频

截图/视频演示
[上传媒体在这里]

日志

日志

[Paste your logs here]

Flutter Doctor输出

医生输出

✓] Flutter (Channel master, 3.23.0-13.0.pre.218, on macOS 14.5 23F79 darwin-arm64, locale es-AR)
• Flutter version 3.23.0-13.0.pre.218 on channel master at /Users/somnio/Desktop/flutter/flutter
• Upstream repository https://github.com/flutter/flutter.git 
• Framework revision 651f25f2a4 (45 minutes ago), 2024-06-13 19:36:17 +0200
• Engine revision 4cb3025d3a
• Dart version 3.5.0 (build 3.5.0-254.0.dev)
• DevTools version 2.36.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/somnio/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
• Xcode at /Applications/Xcode-beta.app/Contents/Developer
• Build 16A5171c
• CocoaPods version 1.15.2

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

[✓] Android Studio (version 2024.1)
• 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.10+0-17.0.10b1087.21-11609105)

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

[✓] Connected device (4 available)
• iPhone 15 Pro Max (mobile)      • 5D349037-F7D3-48EF-B58E-9006A54F6D5E • ios            •
com.apple.CoreSimulator.SimRuntime.iOS-18-0 (simulator)
• macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.5 23F79 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.5 23F79 darwin-arm64
• Chrome (web)                    • chrome                               • web-javascript • Google Chrome 125.0.6422.142

[✓] Network resources
• All expected network resources are available.

• No issues found!
hfyxw5xn

hfyxw5xn2#

这个错误也发生在通过运行flutter createflutter run创建基本的Flutter应用时,以及在使用这些版本和这个Flutter doctor运行Wonderous app(https://github.com/gskinnerTeam/flutter-wonderous-app.git)时:

`flutter doctor -v
[✓] Flutter (Channel master, 3.23.0-13.0.pre.341, on macOS 14.5 23F79 darwin-arm64, locale en-US)
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale en-US)
    • Flutter version 3.22.2 on channel stable at /Users/josefinadiz/flutter/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (3 weeks ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/josefinadiz/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Build 16A5171r
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2024.1)
    • 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.10+0-17.0.10b1087.21-11609105)

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

[✓] Connected device (3 available)
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 14.5 23F79 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 14.5 23F79 darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 126.0.6478.127

[✓] Network resources
    • All expected network resources are available.

• No issues found!
`

相关问题