xcode 找不到这样的模块“GoogleMaps”,但已安装
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37633766/
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
No such module 'GoogleMaps' found however it is installed
提问by maz
I have installed the 'GoogleMaps' pod using cocoa pods and the project was building correctly, however when I transferred my project to another device through iCloud (the projects directory is in iCloud) the GoogleMaps pod stopped working. I attempted to simply run pod install again however this mad no difference, the pod is clearly there and the pod install was successful. I am beyond confused.
我已经使用可可豆荚安装了“GoogleMaps”豆荚并且项目构建正确,但是当我通过 iCloud 将我的项目转移到另一台设备(项目目录在 iCloud 中)时,GoogleMaps 豆荚停止工作。我试图再次简单地运行 pod install 但是这没有什么区别,pod 显然在那里并且 pod install 成功。我非常困惑。
采纳答案by Axel
First off try to clean the project by
首先尝试通过以下方式清理项目
Command + Shift + Options + K
Command + Shift + 选项 + K
If I'm not mistaken, GoogleMaps framework is built from Objective-C so if there's still a problem then do the following steps:
如果我没记错的话,GoogleMaps 框架是从 Objective-C 构建的,所以如果仍然存在问题,请执行以下步骤:
- Create a bridging header file which you can trigger and setup automatically by creating a dummy Objective-C class in your Swift project. Xcode will then ask you if you would want to create a bridging header, click yes. Delete the dummy class you created after.
Configure the header search path to point the Pods with recursion
Do a clean-build.
回答by Cody Moorhouse
For me to fix mine, I had to update my GoogleMaps pod.
为了修复我的问题,我必须更新我的 GoogleMaps pod。
- To check:
pod outdated
- To update:
pod update GoogleMaps
- To clean cache:
pod cache clean --all
(or you can specify GoogleMaps) - To install:
pod install
- 去检查:
pod outdated
- 更新:
pod update GoogleMaps
- 清理缓存:(
pod cache clean --all
或者您可以指定 GoogleMaps) - 安装:
pod install
回答by Dler
This worked for me:
这对我有用:
- Close the Xcode.
- Remove all pods from project (
pod deintegrate
) - Clean Pods cache (
pod cache clean --all
) - Install all pods again (
pod install
)
- 关闭 Xcode。
- 从项目 (
pod deintegrate
) 中删除所有 Pod - 清理 Pod 缓存 (
pod cache clean --all
) - 再次安装所有 Pod (
pod install
)
回答by Ricardo Delgado
It works for me:
这个对我有用:
Delete folder Pods in your project folder.
Delete file podfile.look and pods.xcodeproject (not delete podfile)
Close X-Code and install pods in your terminal (
pod install
)Open X-Code, clean the project and run.
删除项目文件夹中的文件夹 Pods。
删除文件 podfile.look 和 pods.xcodeproject(不删除 podfile)
关闭 X-Code 并在您的终端中安装 pods (
pod install
)打开 X-Code,清理项目并运行。
回答by Abla Ibraheem
try to comment pod GoogleMaps
and another google pod on your podfile then run pod instal from terminal this will remove your pod install from your project, back to you project on pod file remove your commented pods and run pod install
from terminal one more time, go to your xcode project clean and run this will be work with you.
尝试GoogleMaps
在您的 podfile 上评论 pod和另一个 google pod,然后从终端运行 pod instal 这将从您的项目中删除您的 pod install,返回到您在 pod 文件上的项目删除您评论的 pod 并pod install
再次从终端运行,转到您的 xcode项目清理并运行这将与您合作。