在我的 podfile 中运行以下内容时
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
我收到这些警告:
[!] [Xcodeproj] Generated duplicate UUIDs:
XCBuildConfiguration --
XCBuildConfiguration --
PBXBuildFile --
PBXBuildFile --
这是什么原因造成的?我注意到我的计划中有一些剩余的 tvOS 目标 - 这是可能的原因吗?
最佳答案
它是由不同目录中的重复文件引起的。
有时,当您将文件移动到另一个目录时,Xcode 可能会出错并复制文件。
我的 解决方案 找到这些重复的文件,
duplicateUUIDs.txt
的文本文件中grep -E '[a-zA-Z+]+\.(h|m|swift)' -o duplicateUUIDs.txt | sort | uniq -d
另一种方法 查找重复文件
find . -path ./.git -prune -o -type f -exec basename {} + | sort | uniq -d
哪里
-path ./.git -prune -o
表示排除 .git
查找时的目录https://github.com/CocoaPods/CocoaPods/issues/4370#issuecomment-602368518
关于ios - 在 pod install post_install 步骤中出现重复的 UUID 警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50032037/