错误(Xcode):多个命令产生...,构建 Flutter iOS 应用程序

问题描述 投票:0回答:1

我试图为我的 Flutter 应用程序构建 ipa,但是出现了这个错误:

[   +3 ms] Error (Xcode): Multiple commands produce

'/Users/antonio/Library/Developer/Xcode/DerivedData/Runner-edmltyztwaxqqcevfshktmkpdgia/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FirebaseFirestore_Privac
        y.bundle'
        
[   +6 ms] "flutter ipa" took 29.359ms.
[  +10 ms] Encountered error while archiving for device.
[        ] 
        #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
        #1      _BuildIOSSubCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:680:7)
        <asynchronous suspension>
        #2      BuildIOSArchiveCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:425:50)
        <asynchronous suspension>
        #3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1389:27)
        <asynchronous suspension>
        #4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
        <asynchronous suspension>
        #5      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
        <asynchronous suspension>
        #6      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:355:9)
        <asynchronous suspension>
        #7      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
        <asynchronous suspension>
        #8      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:295:5)
        <asynchronous suspension>
        #9      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:119:9)
        <asynchronous suspension>
        #10     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
        <asynchronous suspension>
        #11     main (package:flutter_tools/executable.dart:90:3)
        <asynchronous suspension>

现在,我在应用程序中使用 Firebase Firestore、Firebase Storage 和 Firebase Authentication,并使用此处提供的预编译 SDK,版本 ^10.24.0。我把这个放进我的

Podfile

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.24.0'

当我在本地模拟器上构建应用程序时它可以工作,但是当我尝试通过

flutter build ipa
构建应用程序时它会出现问题。

请给我一些关于如何修复此错误的想法。 谢谢你。

ios flutter xcode firebase
1个回答
0
投票

已解决

这是 Pod 缓存的问题,感谢对此问题的响应,已解决。

简单地,在终端上一一运行 this 命令:

flutter clean
cd ios && rm -rf Pods && rm Podfile.lock
pod cache clean --all
© www.soinside.com 2019 - 2024. All rights reserved.