xcode <PBXResourcesBuildPhase UUID=..> 试图用未知的 UUID 初始化一个对象

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36597286/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:43:34  来源:igfitidea点击:

<PBXResourcesBuildPhase UUID=..> attempted to initialize an object with an unknown UUID

xcodesvncocoapodsxcode7.2

提问by Jayprakash Dubey

I have taken SVN check-in for a project. Thereafter I have installed pod via terminal. After installation of pod there are few warning stating

我已经为一个项目进行了 SVN 签入。此后,我通过终端安装了 pod 。安装 pod 后,很少有警告说明

    <PBXResourcesBuildPhase UUID=...> attempted to initialise an 
    object with an unknown UUID.

Screenshot for warningWhat might be reason? Is this warning critical?

警告截图可能是什么原因?这个警告很重要吗?

回答by Qiulang

The reason that happened in my case was some developer updated a pod A while I installed a new pod B (without updated pod A). So when I merged his codes I got the warning.

在我的案例中发生的原因是一些开发人员更新了 pod A,而我安装了一个新的 pod B(没有更新的 pod A)。所以当我合并他的代码时,我收到了警告。

An easy way to fix this is to

解决此问题的简单方法是

1. remove libPods.a from General->Linked Frameworks and libraries 
2. run `pod install` or `pod update "an-existing-pod"` again. 

For step #2 the purpose is to update .xcodeproj file not to install pod again. If pod is already there cocoapods will just update .xcodeproj file.

对于第 2 步,目的是更新 .xcodeproj 文件而不是再次安装 pod。如果 pod 已经存在,cocoapods 只会更新 .xcodeproj 文件。

回答by Ted

Xcode 8 - 11

Xcode 8 - 11

Target > General > Linked Frameworks and Libraries

目标 > 常规 > 链接的框架和库

PBXResourcesBuildPhase

PBXResourcesBuildPhase

回答by Nullify

Step 1:Deintegrate your project from CocoaPods. Removing all traces of CocoaPods from your Xcode project.

Step 1:从 CocoaPods 中分解您的项目。从 Xcode 项目中删除 CocoaPods 的所有痕迹。

$pod deintegrate ProjectName.XCODEPROJ

$pod deintegrate ProjectName.XCODEPROJ

Step 2:Install the pod Again

Step 2:再次安装 pod

$pod install

$pod install

回答by Apoc

It still happens from time to time to me. My solution is to search after the unknown UUID in your project file and simply delete all lines you'll find.

它仍然不时发生在我身上。我的解决方案是在您的项目文件中搜索未知的 UUID,然后简单地删除您会找到的所有行。

Terminal-command:

终端命令:

cat YOUR_PROCJECT_NAME.xcodeproj/project.pbxproj | grep 'UNKNOWN_UUID'

You should find something like this:

你应该找到这样的东西:

UNKNOWN_UUID /* (null) in Resources */,

回答by Avinash

Just run

赶紧跑

pod clean pod install.

pod clean pod install.

And those errors should go.

这些错误应该消失。

回答by Adri

I don't know if you fixed this or not, but for future reference, I has the same issue.

我不知道你是否解决了这个问题,但为了将来参考,我有同样的问题。

On my case, after opening .pbxprojfile on a text editor, realised that the first UUID pointed to the 'Copy Bundle Resources'of the 'Build Phases'.

在我的情况下,开封后.pbxproj在文本编辑器文件,实现了第一UUID指出,“复制包资源”的的“构建阶段”

Removing that and adding again fixed the issue for me.

删除并再次添加为我解决了这个问题。

回答by Soman Dubey

There could also be problem with multiple xcode version installations. Try this link for more details -

多个 xcode 版本安装也可能存在问题。试试这个链接了解更多详情 -

https://www.ryadel.com/en/xcode-sdk-iphoneos-cannot-be-located-mac-osx-error-fix/

https://www.ryadel.com/en/xcode-sdk-iphoneos-cannot-be-located-mac-osx-error-fix/

回答by Ankur Lahiry

For my case, I re-run pod installand find this warnings aren't showing. This is due to merging the project file.

对于我的情况,我重新运行pod install并发现此警告未显示。这是由于合并项目文件。