Flutter项目,Xcode15, 编译正常,但archive报错

错误提示

shell 复制代码
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/目录/Developer/Xcode/DerivedData/Runner-brgnkruocugbipaswyuwsjsnqkzm/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-E132D1BC120460B2082A9DF7.sh (in target 'Runner' from project 'Runner')
    cd /Users/app目录/ios
    /bin/sh -c /Users/目录/DerivedData/Runner-brgnkruocugbipaswyuwsjsnqkzm/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-E132D1BC120460B2082A9DF7.sh

mkdir -p /Users/目录/Xcode/DerivedData/Runner-brgnkruocugbipaswyuwsjsnqkzm/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/device_info.framework" "/Users/目录/Developer/Xcode/DerivedData/Runner-brgnkruocugbipaswyuwsjsnqkzm/Build/Intermediates.noindex/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks"
building file list ... rsync: link_stat "/Users/app目录/ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/device_info.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/8e85887f-758c-11ee-a904-2a65a1af8551/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code

Command PhaseScriptExecution failed with a nonzero exit code

解决办法:

1、升级ruby至2.7版本
shell 复制代码
# 安装ruby2.7(2.6.10对于新版本mac(macOS 13.6.4)不适用)
brew install ruby@2.7

# 安装cocoapods
gem install -n /usr/local/bin cocoapods -v 1.11.1
2、在 Pods-Runner-frameworks.sh 文件中进行以下替换:
shell 复制代码
if [ -L "${source}" ]; then
    echo "Symlinked..."
    source="$(readlink "${source}")"
fi

替换为:

shell 复制代码
if [ -L "${source}" ]; then
    echo "Symlinked..."
    source="$(readlink -f "${source}")"
fi
相关推荐
m0_748247801 小时前
Flutter Intl包使用指南:实现国际化和本地化
前端·javascript·flutter
迷雾漫步者2 小时前
Flutter组件————PageView
flutter·跨平台·dart
迷雾漫步者9 小时前
Flutter组件————FloatingActionButton
前端·flutter·dart
coder_pig14 小时前
📝小记:Ubuntu 部署 Jenkins 打包 Flutter APK
flutter·ubuntu·jenkins
捡芝麻丢西瓜16 小时前
flutter自学笔记5- dart 编码规范
flutter·dart
恋猫de小郭16 小时前
什么?Flutter 可能会被 SwiftUI/ArkUI 化?全新的 Flutter Roadmap
flutter·ios·swiftui
sunly_2 天前
Flutter:导航,tab切换,顶部固定,列表分页滚动
开发语言·javascript·flutter
敲代码的小强2 天前
Flutter项目兼容鸿蒙Next系统
flutter·华为·harmonyos
一如初夏丿2 天前
xcode15 报错 does not contain ‘libarclite‘
ios·xcode
app开发工程师V帅2 天前
Xcode 文件缺失:Missing submodule xxx
ide·macos·xcode