【问题标题】:Xcode 12: Command PhaseScriptExecution failed with a nonzero exit codeXcode 12:命令 PhaseScriptExecution 失败,退出代码非零
【发布时间】:2021-02-03 14:56:52
【问题描述】:

我有一个颤振应用程序,我试图从中生成 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

【问题讨论】:

  • 你可以试试flutter build ios --verbose,把日志分享给我们。
  • 我收到相同的错误“命令 PhaseScriptExecution 失败,退出代码为非零”。该应用程序在 Android 和 ios 模拟器上运行良好,但 Xcode12 无法在物理 iPhone 上构建和安装。我还尝试降级到 Xcode 11.4。这是对已在 App Store 上的应用程序的更新。这非常令人沮丧!我收到的错误消息是:/Users/macmini/Library/Developer/Xcode/DerivedData/Runner-fchwywzctlcczngvfhcxqrylsnly/Build/Products/Debug-iphoneos/Runner.app/Frameworks/App.framework/App: errSecInternalComponent Command PhaseScriptExecution failed带有非零退出代码
  • 有人找到答案了吗??我没弄明白..

标签: ios xcode firebase flutter


【解决方案1】:

您是否尝试过以下方法;

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

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

【讨论】:

    【解决方案2】:

    我使用的是 Xcode 12.4

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

    【讨论】:

    • 我仍然在这个错误中运行,还有其他解决方法吗?
    猜你喜欢
    • 2021-07-07
    • 2021-07-17
    • 2021-07-21
    • 2021-02-05
    • 2019-04-16
    • 2020-12-01
    • 2020-07-21
    • 1970-01-01
    • 2022-09-27
    相关资源
    最近更新 更多