iOS,ld:框架未找到适用于架构arm64的GoogleMaps

编程入门 行业动态 更新时间:2024-10-27 10:19:03
本文介绍了iOS,ld:框架未找到适用于架构arm64的GoogleMaps的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在开发一个使用谷歌地图的应用程序。我会解释我对谷歌地图所做的工作,也许你可以帮助我。

我使用的是Google地图框架,没有POD,但是在Google map key我删除了谷歌地图框架引用,并使用POD安装了它。一切工作正常,但当我点击

产品 - >测试

现在我得到这个错误:

ld:未找到框架GoogleMaps for architecture arm64 $ b $

谢谢!

Podfile看起来像这个Cocoapods v1.0 beta 6):

platform:ios,'8.0' use_frameworks! target'Project'做 pod'GoogleMaps' target'ProjectTests'do 继承! :search_paths pod'Mockingjay' end end

解决方案

更新请检查架构和构建活动中是否具有相同的构建设置只有体系结构目标键

您的podfile应该像这样

platform:ios,'8.0' use_frameworks! target'Project'do pod'GoogleMaps' end target'ProjectTests'do // //继承! :search_paths pod'Mockingjay' end

结束项目目标,然后再启动 ProjectTest 目标,同时为什么要添加继承! :search_paths ?它通常不需要,除非你有特殊要求

旧回答

如果你想要你在测试目标中的豆荚比你必须添加,然后在测试中也是以相同的方式添加到项目的主要目标中

所以你的如果SwiftCocoaPods是您的主要目标名称,则为可可豆荚

//其他顶级进口 targetSwiftCocoaPods do b $ b podGoogleMaps end targetSwiftCocoaPodsTestsdo podGoogleMaps end

然后,您应该为SwiftCocoaPodsTests添加测试用的Pod。您可以用您测试目标名称为

来替换名称否则,如果您想在多个目标中添加相同的窗格,可以使用 def 并在所有目标中使用它

def project_pods pod GoogleMaps //在所有目标中添加所需的其他窗格结束 目标SwiftCocoaPodsdo project_pods 结束 //仅添加project_pods而不是单独的pod targetSwiftCocoaPodsTestsdo project_pods end

I'm developing an app using google maps. I will explain what I did with google maps, and maybe you can help me.

I was using Google maps frameworks without POD, but after a few errors about Google map Key I deleted the google map frameworks reference and I installed it using POD. Everything is working fine, but when I hit

Product -> TEST

now I get this error:

ld: framework not found GoogleMaps for architecture arm64

Any idea how fix this?

Thank you!

Podfile looks like this Cocoapods v1.0 beta 6):

platform :ios, '8.0' use_frameworks! target 'Project' do pod 'GoogleMaps' target 'ProjectTests' do inherit! :search_paths pod 'Mockingjay' end end

解决方案

Update Please check if you have same build settings in the Architectures and Build active Architectures only keys of the targets

Your podfile should look like this

platform :ios, '8.0' use_frameworks! target 'Project' do pod 'GoogleMaps' end target 'ProjectTests' do //inherit! :search_paths pod 'Mockingjay' end

End the project target before you start the ProjectTest target, also why you add inherit! :search_paths? it's usually not needed unless you have some special requirement

Old Answer

If you want to you pods in the Test target than you have to add then in the test also the same way you have added in project's main target

So your cocoa pods like this if "SwiftCocoaPods" is your main target name

//other top level imports target "SwiftCocoaPods" do pod "GoogleMaps" end target "SwiftCocoaPodsTests" do pod "GoogleMaps" end

Then you should add pods for the test also like "SwiftCocoaPodsTests". you may replace the name with whatever you Test target name is

Else if you want to add the same pods in the multiple target you can use def and use that in all the targets which looks like this

def project_pods pod "GoogleMaps" //add other pods which you want in all the targets end target "SwiftCocoaPods" do project_pods end //only add project_pods instead of pods individually target "SwiftCocoaPodsTests" do project_pods end

更多推荐

iOS,ld:框架未找到适用于架构arm64的GoogleMaps

本文发布于:2023-11-15 15:06:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1595518.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:适用于   架构   未找到   框架   ld

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!