我的應用程式存檔兩周大(是我所做的最新更新)。
在對顫振代碼進行了一些小的更改(我沒有添加任何包或其他東西)之后,我試圖再次存檔,但我遇到了一些奇怪的錯誤,我不知道來自哪里(那些來自圖書館,所以沒有真正的改變它)。我能夠在模擬器上運行它,而且我能夠毫無問題地構建它。我只是無法存檔。
這是錯誤:
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)
我嘗試了以下方法:
在專案的 ios/ 檔案夾中,將 Podfile 更改為
平臺:ios,'12.0'
在專案的 ios/ 檔案夾內的終端中運行 pod deintegrate。
在您的 ios/ 檔案夾中運行 pod install --repo-update
來自顫振醫生:
[?] 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
```
uj5u.com熱心網友回復:
這是 Xcode 13.3 版中出現的問題。在 Xcode 13.3 中,如果您有使用 UI_USER_INTERFACE_IDIOM() 的代碼,則在運行 Archive 時會收到“Out of Memory”錯誤。將“UI_USER_INTERFACE_IDIOM()”更改為“UIDevice.current.userInterfaceIdiom”可解決該錯誤。
目前,我們有以下解決方案。
- 修改代碼,
- 降級到 Xcode 13.2.1
- 等蘋果修改Xcode
參考
- https://developer.apple.com/forums/thread/702200
- https://bugs.swift.org/browse/SR-16003
- https://github.com/longitachi/ZLPhotoBrowser/issues/699
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/446768.html
下一篇:Xcode無法在范圍內找到列舉
