在 Xcode 中收到“检查依赖项警告:跳过文件”错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19202218/
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
Receiving a "Check dependencies warning: skipping file" error in Xcode
提问by Eptin
I've been carefully following the directions for 'Adding the Google Maps SDK for iOS to your project' with the Google Maps iOS 1.5.0 SDK and Xcode 5.0, while building to an iPhone 4S. When building the project, I get the following warning:
我一直在使用 Google Maps iOS 1.5.0 SDK 和 Xcode 5.0仔细遵循“将适用于 iOS 的 Google Maps SDK 添加到您的项目”的说明,同时构建到 iPhone 4S。构建项目时,我收到以下警告:
Check dependencies
warning: skipping file '/Users/Michael/iOS Development/C&G rough draft/ComingAndGoingRoughDraft/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle' (unexpected file type 'wrapper.plug-in' in Frameworks & Libraries build phase)
Due to this warning, its skipping GoogleMaps.bundle and my app fails to have an embedded Google Map. What am I overlooking with this problem?
由于这个警告,它跳过了 GoogleMaps.bundle 并且我的应用程序无法嵌入谷歌地图。这个问题我忽略了什么?
Additionally, since the Google Map instructionsdon't appear to be updated for Xcode 5, I am manually following these instruction to remove Storyboards from my Single-View Application.
此外,由于Xcode 5的Google Map 说明似乎没有更新,我手动按照这些说明从我的 Single-View Application 中删除 Storyboards。
回答by Eptin
The way to get rid of this error is to be sure to add the GoogleMaps.bundle only to the Frameworks folder in the Project Navigator to the left (do this by dragging and dropping the bundle onto the Frameworks folder).
消除此错误的方法是确保仅将 GoogleMaps.bundle 添加到左侧项目导航器中的 Frameworks 文件夹中(通过将包拖放到 Frameworks 文件夹中来完成此操作)。
Do notadd the GoogleMaps.bundle to the "Linked Frameworks and Libraries" under General, norto the "Link Binaries with Libraries" under Build Phases.
难道不是在GoogleMaps.bundle添加到将军下的“链接的框架和库”,也以“链接二进制与库”下的构建阶段。
Unfortunately, this is only a half-answer. It solves the warning, but Google Maps still does not appear in my app, leaving only a black void where a map should be.
不幸的是,这只是一半的答案。它解决了警告,但谷歌地图仍然没有出现在我的应用程序中,只在地图应该出现的地方留下一个黑色的空白。
More specifically, first go to Build Phasessection of the project. Check underneath the 'Link Binary with Libararies' section, and make sure the bundle file is NOT there (if it is, select it, and click the minus to remove it). Go to Generalsection and look under Linked Frameworks and Libraries to make sure the bundle file is not there either.
更具体地说,首先转到 项目的构建阶段部分。检查“Link Binary with Libararies”部分下方,并确保捆绑文件不存在(如果存在,请选择它,然后单击减号将其删除)。转到General部分并查看 Linked Frameworks and Libraries 以确保 bundle 文件也不存在。
Now, click on Project Navigator (the small folder icon), then drag and drop the bundle file onto the Frameworks folder. It will ask if you want to 'copy files into the destination group's folder'. We'll assume that you've already copied the Google Maps Framework itself earlier, so in this case, leave the Copy Items unchecked (otherwise we'd have redundant files). Now the warning should be resolved.
现在,单击 Project Navigator(小文件夹图标),然后将捆绑文件拖放到 Frameworks 文件夹中。它会询问您是否要“将文件复制到目标组的文件夹中”。我们假设您之前已经复制了 Google Maps Framework 本身,因此在这种情况下,不要选中 Copy Items(否则我们会有多余的文件)。现在应该解决警告。