本文介绍了无法存档,但“构建存档”仍然有效(Xcode 4)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! Xcode现在表现得很奇怪:Xcode is behaving rather strange right now:如果我尝试Build for Archive我的应用程序,构建过程就完成了,没有任何错误或警告。如果我尝试归档,它会给我带来大量的构建错误。每次尝试时错误(和错误数量)都不同。If I try to "Build for Archive" my app, the build process finishes without any errors or warnings. If I attempt to "Archive" though, it will throw a huge load of build errors at me. The errors (and the number of errors) are different every time I try.应用程序在模拟器和设备上运行良好。我之前已经成功存档了相同的应用程序,尽管最后一个成功的存档是使用Xcode 4.0.1(现在为4.0.2)创建的。The app still runs fine on the simulator and on the device. I have successfully archived the same app before, although the last successful archive was created using Xcode 4.0.1 (now 4.0.2). 实时更新:在大量错误中存在一个反复出现的问题:似乎无法找到应用程序的pch文件(预编译头文件)。我想这是所有其他问题的根本错误。问题仍然是为什么归档时无法找到它,尽管所有其他构建类型都完全可用(甚至构建存档)?Amongst the mass of errors there is one recurring issue: It seems like the app's pch file (precompiled header file) can't be found. I suppose this is the root error for all of the other issues. The question remains why it can't be found while archiving, despite being perfectly available to all other build types (and even "build for archive")?我怎么能克服这个错误?如果这是Xcode 4.0.2中的错误:有没有办法在不使用存档选项的情况下存档构建?How can I overcome this error? If this is a bug in Xcode 4.0.2: Is there a way to archive a build without using the "Archive" option? 编辑: 这可能是另一个提示:在抱怨无法找到pch之后,另一个错误说找到了一个或多个PCH文件,但它们无效 - hokay ......This may be another hint: Right after complaining that the pch couldn't be found, another error says "one or more PCH files were found, but they were invalid" - hokay...推荐答案今天早上在XCode 4.0.2中为我的4.2.3设备做了类似的问题。通过运行Clean,然后重新构建来修复它。Had a similar issue this morning building for my 4.2.3 device in XCode 4.0.2. Fixed it by running Clean, then building again.最近有一篇关于此的帖子:A recent post has been made regarding this: XCode 4存档错误:找到了一个或多个PCH文件,但它们无效这可能对您有帮助。 这篇关于无法存档,但“构建存档”仍然有效(Xcode 4)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-03 06:20