Xcode 12:命令PhaseScriptExecution失败,退出代码非零

时间:2020-10-20 18:03:35

标签: ios xcode firebase flutter

我有一个不稳定的应用程序,试图从中生成IOS的发行版,但是我遇到了这个错误:

 sent 29 bytes  received 20 bytes  98.00 bytes/sec
    total size is 0  speedup is 0.00
    rsync error: some files could not be transferred (code 23) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description 

我已经尝试了大多数互联网解决方案来解决此错误,但仍然会得到相同的结果,我不确定它是否与特定问题有关或属于一般性错误,我们将不胜感激任何建议

flutter build ios --verbose 

这是日志:

/Users/husseinajam/Library/Developer/Xcode/DerivedData/Runner-blmaktiwmbrumnfrwrxbcbrwqoqk/Build/Intermediates.noindex/Runner.build/Release-
                            iphoneos/Runner.build/Script-3B06AD1E1E4923F5004D2608.sh
                        ♦ mkdir -p -- /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Frameworks
                        ♦ rsync -av --delete /Users/husseinajam/Desktop/imim/ios/../ios/Flutter/App.framework
                        /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Frameworks
                        building file list ... rsync: link_stat "/Users/husseinajam/Desktop/imim/ios/../ios/Flutter/App.framework"
failed: No such file
                        or directory (2)
                        done
                    
                        sent 29 bytes  received 20 bytes  98.00 bytes/sec
                        total size is 0  speedup is 0.00
                        rsync error: some files could not be transferred (code 23) at
                        /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
                        Command PhaseScriptExecution failed with a nonzero exit code
                    
                        GenerateDSYMFile /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app.dSYM
                        /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Runner (in target 'Runner' from project
'Runner')
                            cd /Users/husseinajam/Desktop/imim/ios
                            /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil
                            /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Runner -o
                            /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app.dSYM
                    
                    
[+8613 ms] "flutter ios" took 118,982ms.
[   +5 ms] Encountered error while building for device.
[   +2 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
           #1      BuildIOSCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:116:7)
           <asynchronous suspension>
           #2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:977:18)
           #3      _rootRunUnary (dart:async/zone.dart:1198:47)
           #4      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
           #5      _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
           #6      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
           #7      Future._propagateToListeners (dart:async/future_impl.dart:725:32)
           #8      Future._completeWithValue (dart:async/future_impl.dart:529:5)
           #9      Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
           #10     _rootRun (dart:async/zone.dart:1190:13)
           #11     _CustomZone.run (dart:async/zone.dart:1093:19)
           #12     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
           #13     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
           #14     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
           #15     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
           #16     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
           #17     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
           
           
[ +744 ms] ensureAnalyticsSent: 257ms
[   +2 ms] Running shutdown hooks
[        ] Shutdown hook priority 4
[   +1 ms] Shutdown hooks complete
[        ] exiting with code 1

2 个答案:

答案 0 :(得分:0)

您尝试过以下内容吗?

  • 'flutter clean'命令->运行build(如果支持iOS 9,请尝试将其更改为iOS 11进行测试)

  • 将flutter更新到最新版本并运行并运行第一步?

答案 1 :(得分:0)

我使用的是 Xcode 12.4

Build Settings -> Targets -> Build Active Architecture Only, set it to Yes.[Debug,Profile & Release for all]