6

我完全为那个问题发疯了..我有一个工作正常的项目,但是在我添加 facebook sdk 之后它给了我以下错误(错误让我删除 armv6 希望它之后能正常工作,但它给出了更多问题,因为我'正在经历它..我现在一起使用arch armv7和armv7s,这就是它给出的错误

/Users/ME/Library/Developer/Xcode/DerivedData/Cocktail-gfjrrmcunekvfiacogqdfcxliqfg/Build/Intermediates/Cocktail.build/Debug-iphoneos/Cocktail.build/Objects-normal/armv7/Cocktail normal armv7 cd "/Users/ME/Apple DistributedApps/Cocktail All/Cocktail" setenv IPHONEOS_DEPLOYMENT_TARGET 4.3 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin :/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app /Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/ME/Library/Developer/Xcode/DerivedData/MyProj-gfjrrmcunekvfiacogqdfcxliqfg/Build/Products/Debug-iphoneos"-L/Users/ME/Apple DistributedApps/MyProj All/MyProj”-F/Users/ME/Library/Developer/Xcode/DerivedData/MyProj-gfjrrmcunekvfiacogqdfcxliqfg/Build/Products/Debug-iphoneos”-F/Users/ME/Apple DistributedApps/MyProj All/MyProj”-filelist /Users/ME/Library/Developer/Xcode/DerivedData/MyProj-gfjrrmcunekvfiacogqdfcxliqfg/Build/Intermediates/MyProj.build/Debug-iphoneos/MyProj.build/Objects-normal/armv7/MyProj。 LinkFileList -dead_strip -ObjC -all_load -lxml2 -lsqlite3.0 -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=4.3 -framework AdSupport -framework Social -framework SystemConfiguration -framework MapKit -framework CoreLocation -framework Twitter -框架 AssetsLibrary -framework MobileCoreServices -framework CoreVideo -framework CoreMedia -lz -lsqlite3。0 -framework AddressBook -framework CFNetwork -framework CoreFoundation -framework Security -framework iAd -framework MessageUI -framework QuartzCore -framework AudioToolbox -framework MediaPlayer -framework AVFoundation -framework CoreGraphics -framework UIKit -framework Foundation -framework FacebookSDK -framework RevMobAds -lFlurryAnalytics -o /Users/ME/Library/Developer/Xcode/DerivedData/MyProj-gfjrrmcunekvfiacogqdfcxliqfg/Build/Intermediates/MyProj.build/Debug-iphoneos/MyProj.build/Objects-normal/armv7/MyProj构建/对象-正常/armv7/MyProj构建/对象-正常/armv7/MyProj

    Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_ACAccountStore", referenced from:
      objc-class-ref in FacebookSDK(FBSession.o)
  "_SKStoreProductParameterITunesItemIdentifier", referenced from:
      -[RevMobStoreController openStoreWithITunesItemId:] in RevMobAds(RevMobStoreController.o)
  "_ACFacebookAudienceFriends", referenced from:
      -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
  "_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
      objc-class-ref in RevMobAds(RevMobStoreController.o)
  "_OBJC_CLASS_$_GADBannerView", referenced from:
      objc-class-ref in NewsViewController.o
      objc-class-ref in SportsViewController.o
      objc-class-ref in LecViewController.o
      objc-class-ref in AccViewController.o
      objc-class-ref in JokesViewController.o
      objc-class-ref in GamesViewController.o
      objc-class-ref in CaricViewController.o
      ...
  "_ACFacebookAppIdKey", referenced from:
      -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
  "_ACAccountTypeIdentifierFacebook", referenced from:
      +[FBSession renewSystemAuthorization] in FacebookSDK(FBSession.o)
  "_ACFacebookAudienceKey", referenced from:
      -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
  "_ACFacebookAudienceOnlyMe", referenced from:
      -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
  "_kGADAdSizeSmartBannerPortrait", referenced from:
      -[NewsViewController shouldAutorotateToInterfaceOrientation:] in NewsViewController.o
      -[SportsViewController viewDidLoad] in SportsViewController.o
      -[LecViewController viewDidLoad] in LecViewController.o
      -[AccViewController viewDidLoad] in AccViewController.o
      -[JokesViewController viewDidLoad] in JokesViewController.o
      -[GamesViewController viewDidLoad] in GamesViewController.o
      -[CaricViewController viewDidLoad] in CaricViewController.o
      ...
  "_OBJC_CLASS_$_GADRequest", referenced from:
      objc-class-ref in NewsViewController.o
      objc-class-ref in SportsViewController.o
      objc-class-ref in LecViewController.o
      objc-class-ref in AccViewController.o
      objc-class-ref in JokesViewController.o
      objc-class-ref in GamesViewController.o
      objc-class-ref in CaricViewController.o
      ...
  "_ACFacebookPermissionsKey", referenced from:
      -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
  "_CGSizeFromGADAdSize", referenced from:
      -[NewsViewController shouldAutorotateToInterfaceOrientation:] in NewsViewController.o
      -[SportsViewController viewDidLoad] in SportsViewController.o
      -[LecViewController viewDidLoad] in LecViewController.o
      -[AccViewController viewDidLoad] in AccViewController.o
      -[JokesViewController viewDidLoad] in JokesViewController.o
      -[GamesViewController viewDidLoad] in GamesViewController.o
      -[CaricViewController viewDidLoad] in CaricViewController.o
      ...
  "_ACFacebookAudienceEveryone", referenced from:
      -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
4

3 回答 3

4

作为临时解决方案,您可以从 Xcode 项目的架构中删除 armv7s。将“$(ARCHS_STANDARD_32_BIT)”更改为“armv7”。更新库时,更改回以重新添加 armv7s 支持。

于 2012-10-14T14:08:27.240 回答
2

Facebook sdk 不是为 armv7s 编译的,但是你可以自己编译

看看 Liam nichols 在这里的回答

https://developers.facebook.com/bugs/107674376052717/

从 git hub 页面( facebook git hub )下载源代码的副本打开 xcode 项目并在构建设置中将架构更改为 armv7、armv7s 关闭项目导航到 /scripts 并在终端运行./build_all.sh 当它完成编译时,您可以在 builds/FacebookSDK.framework 中找到该框架

于 2012-10-14T13:50:21.893 回答
0

armv7s从部分中删除valid architectures,它将起作用。

构建设置 --> 架构 --> 有效架构

Xcode 构建设置

于 2014-02-28T16:00:18.637 回答