gpt4 book ai didi

ios - 在 pod install post_install 步骤中出现重复的 UUID 警告

转载 作者:行者123 更新时间:2023-12-01 15:20:51 28 4
gpt4 key购买 nike

在我的 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
  • 在 pod 源目录中找到它们并删除不需要的文件。

  • 另一种方法 查找重复文件

    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/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com