Cocoapods and Xcode, ld: library not found for -lAFNetworking

僤鯓⒐⒋嵵緔 提交于 2019-12-23 12:51:33

问题


I have this pod file contains all of these libs

platform :ios, "7.0"

target "PP for iPad" do
pod 'AFNetworking', '1.1'
pod 'RaptureXML', '1.0'
pod 'NoticeView'
pod 'iVersion'
pod 'iRate'
pod 'Facebook-iOS-SDK', '3.13.1'
pod 'StackMob'
pod 'SSZipArchive'
pod 'ODRefreshControl'
pod 'SDWebImage'
pod 'TPKeyboardAvoiding'
pod 'LXPagingViews'
pod 'AQGridView'
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
end

I ran it successfully with 'pod install' ... but when I try to run my project i get this error

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

any idea how to solve this error?


回答1:


Maybe you need set the property Build Active Architecture Only to NO in Target->Build Settings for Debug (in the Pods Project and/or in the target AFNetworking of Pods project). Also make sure that the corresponding Valid Architectures are included (e.g. 'armv7 arm64'). You may have received a Compilation Warning while building the project.




回答2:


Try to makes your ONLY_ACTIVE_ARCH setting in Target (not in Project) to YES and back to NO in order to reset some internal Xcode's cache reference.(NOTICE: Must make it YES first and then set it back to NO).



来源:https://stackoverflow.com/questions/32612101/cocoapods-and-xcode-ld-library-not-found-for-lafnetworking

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!