xcode 未找到 -lAFNetworking 的库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31596552/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 07:32:35  来源:igfitidea点击:

library not found for -lAFNetworking

xcodeafnetworkingcocoapods

提问by MayNotBe

I have a project on Bitbucket that builds fine on one machine. I cloned it on another machine, did a pod install, everything installed fine. I open the .xcworkspace and it won't build because of the error in the title of this post.

我有一个关于 Bitbucket 的项目,可以在一台机器上很好地构建。我在另一台机器上克隆了它,做了一个pod install,一切都安装得很好。我打开 .xcworkspace 并且它不会因为这篇文章标题中的错误而构建。

When the project is deleted from the original machine and cloned there (pods installed, etc.) it builds fine.

当项目从原始机器中删除并在那里克隆(安装了 pods 等)时,它构建得很好。

I don't don't know what's different about the other machine or what information I can provide here to ask this question.

我不知道另一台机器有什么不同,也不知道我可以在这里提供什么信息来问这个问题。

Here's the contents of my podfile:

这是我的 podfile 的内容:

# Uncomment this line to define a global platform for your project
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, "7.0"

link_with 'Extender', 'DefinitiveExtender'

pod 'zipzap', '~> 7.0'
pod 'SQKPieProgressView', '~> 1.0'
pod 'AFNetworking', '~> 2.3'
pod 'MBProgressHUD', '~> 0.9'
pod 'Reachability', '~> 3.1'
pod 'HockeySDK', '~> 3.5.7'
pod 'Parse', '~> 1.4'

回答by Helen Vasconcelos

I ran into the same issue. In my case what was happening was that for some reason libPods wasn't being linked.

我遇到了同样的问题。就我而言,发生的事情是由于某种原因 libPods 没有被链接。

Click on the project, go to General, click on your targetand then scroll down to Linked Frameworks and Libraries. There I made sure to include libPods.a and then the project built fine. Hope that helps.

单击project,转到General,单击您的target,然后向下滚动到Linked Frameworks and Libraries。在那里,我确保包含 libPods.a,然后项目构建良好。希望有帮助。