PBXCP:在最近的 xcode 中没有这样的文件或目录
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15887410/
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
PBXCP: No such file or directory, in most recent xcode
提问by Joe Komputer
I have been modifying this open source code with Xcode 3.0 but as soon as I updated my Xcode to 4.0+ and tryed running it it no longer worked. The first error I ran into was this
我一直在用 Xcode 3.0 修改这个开源代码,但是一旦我将我的 Xcode 更新到 4.0+ 并尝试运行它,它就不再工作了。我遇到的第一个错误是这个
/Users/newperson/Library/Developer/Xcode/DerivedData/Hellcraft-etesgjzdmfzimlgvakidckjecgij/Build
/Intermediates/Hellcraft.build/Debug-iphonesimulator/Doom.build/Script-
435F41A90F532CA300887552.sh: line 3: /Applications/Xcode.app/Contents/Developer/Libra/PrivateFrameworks
/DevToolsCore.framework/Resources/pbxcp: No such file or directory
I figured it had something to do with the Run Script under build phases, which is set as this:
我认为它与构建阶段下的运行脚本有关,它设置为:
/bin/sh -x
PBXCP=${DEVELOPER_DIR}/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp
${PBXCP} -exclude .svn "${PROJECT_DIR}/../../base"
"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/"
But after looking online and modifying the shell script countless amount of times I have not been able to find a solution. I found somewhere that pbxcp has been removed in the more recent versions of Xcode, but I am unable to find a suitable replacement, and am unable to incorporate that DevToolsCore into the new version of Xcode.
但是在网上查看并修改了无数次shell脚本后,我一直无法找到解决方案。我发现在较新版本的 Xcode 中 pbxcp 已被删除,但我找不到合适的替代品,并且无法将该 DevToolsCore 合并到新版本的 Xcode 中。
After finding a forum that said I should run an alternative script in order to makeup for the missing pbxcp file I tryed running this:
在找到一个论坛说我应该运行一个替代脚本以弥补丢失的 pbxcp 文件后,我尝试运行这个:
/usr/bin/tar -c -C "${PROJECT_DIR}/myframeworks" --exclude .DS_Store --exclude CVS --exclude
.svn --exclude .git -H `cd "${PROJECT_DIR}/myframeworks" && find DevToolsCore.framework` |
/usr/bin/tar -x -C ${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}
I created a file called myframeworks in the project directory and added DevToolsCore.framework to it, although this fixed the missing pbxcp problem it generated another error:
我在项目目录中创建了一个名为 myframeworks 的文件并将 DevToolsCore.framework 添加到其中,尽管这修复了缺少的 pbxcp 问题,但它产生了另一个错误:
tar: could not chdir to '/Users/newperson/Library/Developer/Xcode/DerivedData/Hellcraft-
etesgjzdmfzimlgvakidckjecgij/Build/Products/Debug-iphonesimulator/Doom.app/Frameworks'
tar: Write error
Command /bin/sh failed with exit code 1
If anyone has any advice it would be great, I'm pulling my hair out.
如果有人有任何建议,那就太好了,我正在拔头发。
回答by Abhishek
You probably would have deleted some item from your Xcode.I also had this PBXc error, all i did was i added the same file again and got rid of that error.
你可能会从你的 Xcode 中删除一些项目。我也有这个 PBXc 错误,我所做的只是我再次添加了相同的文件并摆脱了那个错误。
回答by Adrian Frühwirth
See the duplicateand here. The thread states that pbxcp
got removed in Xcode 4.4 and as it was an Xcode-internal tool there is no official replacement, but the thread does offer a replacement if you scroll down using tar
and find
.
请参阅副本和此处。该线程指出pbxcp
已在 Xcode 4.4 中删除,并且由于它是 Xcode 内部工具,因此没有官方替代品,但如果您使用tar
和向下滚动,该线程确实提供了替代品find
。