两周前我的应用程序存档(是我做的最新更新).

在flatter代码中进行了一些小的更改(我没有添加任何包或其他东西)之后,我正在try 再次归档,我遇到了一些疏远的错误,我不知道这些错误来自何处(这些错误来自库,所以没有真正的更改).我能够在模拟器上运行它,也能够毫无问题地进行构建.我就是不能存档.

这就是错误:

Running Xcode build...                                                  
Xcode archive done.                                         80.5s
Failed to build iOS app
Error output from Xcode build:
↳
    2022-03-20 00:27:32.265 xcodebuild[22543:393081] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension
    Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
    2022-03-20 00:27:32.266 xcodebuild[22543:393081] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension
    Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
    ** ARCHIVE FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/lp/myd6ssb57_jg81p9920h5_sr0000gn/T/flutter_tools.AJZJFr/flutter_ios_build_temp_dir4zPWKc/temporary_xcresult_bundle

    LLVM ERROR: out of memory
    Allocation failed
    Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
    Stack dump:
    0.  Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file
    /Users/eae/Library/Developer/Xcode/DerivedData/Runner-cssekixerfgncvbcfrtqdpehzsfb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/prin
    ting.build/Objects-normal/arm64/PrintJob.bc -embed-bitcode -target arm64-apple-ios11.0 -Xllvm -aarch64-use-tbi -O -disable-llvm-optzns -module-name printing -o
    /Users/eae/Library/Developer/Xcode/DerivedData/Runner-cssekixerfgncvbcfrtqdpehzsfb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/prin
    ting.build/Objects-normal/arm64/PrintJob.o
    1.  Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
    2.  Compiling with the current language version
    3.  Running pass 'Function Pass Manager' on module
    '/Users/eae/Library/Developer/Xcode/DerivedData/Runner-cssekixerfgncvbcfrtqdpehzsfb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/pri
    nting.build/Objects-normal/arm64/PrintJob.bc'.
    4.  Running pass 'ObjC ARC contraction' on function '@UI_USER_INTERFACE_IDIOM'
    Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
    0  swift-frontend           0x0000000107437de7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
    1  swift-frontend           0x0000000107436e38 llvm::sys::RunSignalHandlers() + 248
    2  swift-frontend           0x0000000107438440 SignalHandler(int) + 288
    3  libsystem_platform.dylib 0x00007ff80f10cdfd _sigtramp + 29
    4  libsystem_malloc.dylib   0x00007ff80ef2aabb _malloc_zone_malloc + 125
    5  libsystem_c.dylib        0x00007ff80f042d24 abort + 123
    6  swift-frontend           0x0000000107384cda llvm::report_bad_alloc_error(char const*, bool) + 106
    7  swift-frontend           0x0000000107384cf2 out_of_memory_new_handler() + 18
    8  libc++abi.dylib          0x00007ff80f0b496b operator new(unsigned long) + 43
    9  swift-frontend           0x0000000107145efd llvm::Function::BuildLazyArguments() const + 77
    10 swift-frontend           0x0000000104f2ee87 llvm::objcarc::BundledRetainClaimRVs::insertRVCallWithColors(llvm::Instruction*, llvm::CallBase*, llvm::DenseMap<llvm::BasicBlock*,
    llvm::TinyPtrVector<llvm::BasicBlock*>, llvm::DenseMapInfo<llvm::BasicBlock*>, llvm::detail::DenseMapPair<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*> > > const&) + 151
    11 swift-frontend           0x0000000104f41f88 (anonymous namespace)::ObjCARCContract::run(llvm::Function&, llvm::AAResults*, llvm::DominatorTree*) + 1384
    12 swift-frontend           0x000000010717d380 llvm::FPPassManager::runOnFunction(llvm::Function&) + 1488
    13 swift-frontend           0x0000000107184073 llvm::FPPassManager::runOnModule(llvm::Module&) + 67
    14 swift-frontend           0x000000010717db39 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1161
    15 swift-frontend           0x000000010269b6df swift::performLLVMOptimizations(swift::IRGenOptions const&, llvm::Module*, llvm::TargetMachine*) + 3791
    16 swift-frontend           0x000000010269c8cc swift::performLLVM(swift::IRGenOptions const&, swift::DiagnosticEngine&, llvm::sys::SmartMutex<false>*, llvm::GlobalVariable*, llvm::Module*,
    llvm::TargetMachine*, llvm::StringRef, swift::UnifiedStatsReporter*) + 2812
    17 swift-frontend           0x00000001026a5aa5 swift::performLLVM(swift::IRGenOptions const&, swift::ASTContext&, llvm::Module*, llvm::StringRef) + 213
    18 swift-frontend           0x0000000102160795 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 16565
    19 swift-frontend           0x000000010211f5d4 swift::mainEntry(int, char const**) + 1108
    20 dyld                     0x000000011690651e start + 462
    error: Abort trap: 6 (in target 'printing' from project 'Pods')
    error: backend command failed due to signal 6 (use -v to see invocation)

我try 了以下方法:

  • 在项目的ios/文件夹中,将Podfile更改为

    平台:ios,‘12.0’

  • 在项目的ios/文件夹内的终端中运行pod deintegrate.

  • 在ios/文件夹中运行pod安装--repo更新

来自弗利特doctor :

[✓] Flutter (Channel stable, 2.10.3, on macOS 12.3 21E230 darwin-x64, locale en-ES)
    • Flutter version 2.10.3 at /Users/eae/Flutter/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (2 weeks ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/eae/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ 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 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.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 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.65.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      ???? https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • iPhone 13 (mobile) • 50A38949-153E-4E22-AAF3-E96FC64DF2B5 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-4 (simulator)
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 99.0.4844.74

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

推荐答案

这是Xcode版本13.3中出现的一个问题.在Xcode 13.3中,如果您的代码使用UI_USER_INTERFACE_IDIOM(),则在运行存档时会出现"内存不足"错误.

目前,我们有以下解决方案.

  • 修改代码,
  • 降级至Xcode 13.2.1
  • 等待苹果修改Xcode

工具书类

Flutter相关问答推荐

获取屏幕大小的滚动视图与动态大小?

如何在应用程序启动时解析和加载JSON文件?

在Flutter 中压缩图片返回空

在Flutter 中更改扩展瓷砖的高度

Firebase WHERE过滤器在日期字段中不起作用

如何在 Flutter 中创建厚度沿着容器逐渐减小的边框

在 Dart 中按土耳其语字母顺序对字符串进行排序

在使用 Android 12+ 的真实 Android 设备上,SingleChildScrollView 中最初位于视口之外的无响应 Web 视图

Flutter屏幕适配 - 在模拟器和真实手机上文本尺寸不同

Flutter url_launcher 插件抛出java.lang.IllegalArgumentException:接收器未注册:io.flutter.plugins.urllauncher.WebViewActivity

如何在 Flutter 执行通知时运行后台代码?

仅使用 Flutter 在本地环境中托管 Web 服务器

Flutter 如何要求用户在应用程序中设置电话密码?

如何使用列Flutter 中文本占用的空间来控制svg宽度

我几乎每次都将 Stateless Widget 与 BLoC 一起使用.我错了吗?

Flutter 中父容器顶部的 Gridview 间距额外区域

gridview 的所有按钮都应该在Flutter 中适合其父容器

如何在dart中编写多个条件?

setState 不会在第一次更新 - Flutter

我已经删除了我的 .android 密钥库,但我没有使用它,如何生成一个新的?