问题
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.
回答1:
First off try to clean the project by
Command + Shift + Options + 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:
- 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.
回答2:
For me to fix mine, I had to update my 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
回答3:
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
)
回答4:
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.
来源:https://stackoverflow.com/questions/37633766/no-such-module-googlemaps-found-however-it-is-installed