Framework not found GoogleMaps sdk in iOS

2020-02-03 10:24发布

I want to use google map to existing(not a new one) iPhone project.Now i am using Google map ios sdk and i successfully added google map framework to my project.But i got error like this

ld: framework not found GoogleMaps
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How to solve this issue.I am using xcode4.5 and google map iOS sdk version is 1.5. When i am creating new project with google map iOS sdk then no error getting for me.Error only for existing iOS Project.Please help me.

12条回答
干净又极端
2楼-- · 2020-02-03 10:52

Sometimes it happens when you are migrating the code from one system to another so your Framework search paths look empty at this moment, so one simple solution I try is to reinstall the podfile and it works for me.

查看更多
祖国的老花朵
3楼-- · 2020-02-03 10:55

I encountered a scenario in which I had to import a project that was using Google Maps and noticed the same problem - module: "Google Maps" not found. To solve this problem it was necessary to delete Podfile.lock and Podfile folder and re-install the pods again. Good luck !

查看更多
混吃等死
4楼-- · 2020-02-03 10:59

Clean your project. The shortcut is command + shift + k. This will clear information that xcode has stored that might imply that the sdk isn't included.

Also press the project icon at the top of the hierarchy of files, press the target that is your project, press build phases, open link with binary libraries, and make sure that the google maps sdk is in there. If it is not, press + and add it in.

查看更多
时光不老,我们不散
5楼-- · 2020-02-03 11:00

You can also : - remove GoogleMaps from Podfile - pod install - add GoogleMaps to your Podfile again - pod install

This solution works for me, you can also check the search paths a well.

查看更多
姐就是有狂的资本
6楼-- · 2020-02-03 11:01

Delete derived data and delete Podfile.lock file and then run pod install.

查看更多
男人必须洒脱
7楼-- · 2020-02-03 11:04

If you use Pods

Left menu > Pods > Pods > choose Framework > right menu > copy path from "ios/....."

My: ios/Pods/GoogleMaps/Maps/Frameworks/GoogleMaps.framework

enter image description here

Then Project > Build Setting > Framework Search Path > Click on

$(PROJECT_DIR)/ios/Pods/GoogleMaps/Maps/Frameworks/GoogleMapsCore.framework

enter image description here

查看更多
登录 后发表回答