归档时命令PhaseScriptExecution失败,退出代码为非零值
回答 2
浏览 2782
2023-04-04
我有我的flutter应用程序,我能够建立它并在我的iPhone上运行,但当我试图将它归档上传到测试时,我得到了这个错误:
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/alingavriliuc/Library/Developer/Xcode/DerivedData/Runner-cujzpewjolforngnoxyherjuheln/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-AF6B532C04771866E7662848.sh (in target 'Runner' from project 'Runner')
cd /Users/alingavriliuc/Documents/mdb-flutter-app/frontend/ios
/bin/sh -c /Users/alingavriliuc/Library/Developer/Xcode/DerivedData/Runner-cujzpewjolforngnoxyherjuheln/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-AF6B532C04771866E7662848.sh
mkdir -p /Users/alingavriliuc/Library/Developer/Xcode/DerivedData/Runner-cujzpewjolforngnoxyherjuheln/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/Runner.app/Frameworks
Symlinked...
rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/openssl_grpc.framework" "/Users/alingavriliuc/Library/Developer/Xcode/DerivedData/Runner-cujzpewjolforngnoxyherjuheln/Build/Intermediates.noindex/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks"
building file list ... rsync: link_stat "/Users/alingavriliuc/Documents/mdb-flutter-app/frontend/ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/openssl_grpc.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/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
显示最近的问题
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Flutter clean
Pods install --repo-update
Pods deintegrate
2 个回答
#1楼
已采纳
得票数 33
试试这个解决方案(对我来说是有效的):
现在Cocoapods有一个问题,因为Xcode 14.3现在在框架的symlink中使用相对路径。
要么等待Cocoapods 1.12.1版本的发布,要么在你的Pods-Runner-frameworks.sh文件中做这个简单的修改
你可以在以下路径中找到它:"ios\Pods\Target Support Files\Pods-Runner\Pods-Runner-frameworks.sh";
替换:
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
为:
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink -f "${source}")"
** 注意添加了-f的内容。
然后你可以将其归档,并上传你的应用程序。
这在我的案例中是有效的。但是每当我重建应用程序时,它就会把Pods-Runner-frameworks.sh文件反过来。要想让这个文件在不同的构建中持续存在,你可以按照这里的说明进行:github.com/CocoaPods/CocoaPods/issues/… 基本上,你改变了Podfile,所以它在构建时附加了-f标志,而不是手动改变.sh文件。
- frenzy_funky 2023-04-10
#2楼
得票数 5
按照Ali Al-Amrad的建议,我用命令升级到了Cocoapods 1.12.1版本:
sudo gem install cocoapods
然后,我不得不重新安装我的项目pods:
pod deintegrate; pod install