2017-04-03 81 views
1

我遇到了问题,因为尝试更新一些框架。我使用pod更新,之后无法构建我的项目。该错误信息是:更新库与椰子树打破构建

Undefined symbols for architecture i386: 
    "_OBJC_CLASS_$_AFHTTPSessionManager", referenced from: 
     objc-class-ref in ... 
     objc-class-ref in ... 
    "_OBJC_CLASS_$_AFJSONRequestSerializer", referenced from: 
     objc-class-ref in ... 
     objc-class-ref in ... 
    "_OBJC_CLASS_$_AFNetworkActivityIndicatorManager", referenced from: 
     objc-class-ref in .... 
    "_OBJC_CLASS_$_AFNetworkReachabilityManager", referenced from: 
     objc-class-ref in .... 
     objc-class-ref in Utils.o 
    "_OBJC_CLASS_$_CSNotificationView", referenced from: 
     objc-class-ref in ...+Utils.o 
     objc-class-ref in ... 
     objc-class-ref in ... 
     objc-class-ref in ... 
     objc-class-ref in ... 
     objc-class-ref in ... 
     objc-class-ref in ... 
     ... 
    "_OBJC_CLASS_$_GAI", referenced from: 
     objc-class-ref in .... 
    "_OBJC_CLASS_$_GAIDictionaryBuilder", referenced from: 
     objc-class-ref in .... 
    "_OBJC_CLASS_$_IQKeyboardManager", referenced from: 
     objc-class-ref in ..... 
    "_OBJC_CLASS_$_LTHPasscodeViewController", referenced from: 
     objc-class-ref in ..... 
     objc-class-ref in LTHPasscodeViewController+Config.o 
     l_OBJC_$_CATEGORY_LTHPasscodeViewController_$_Config in LTHPasscodeViewController+Config.o 
     objc-class-ref in ... 
     objc-class-ref in .... 
     objc-class-ref in .... 
     objc-class-ref in .... 
     ... 
    "_OBJC_CLASS_$_MagicalRecord", referenced from: 
     objc-class-ref in ..... 
    "_OBJC_CLASS_$_PCPieChart", referenced from: 
     objc-class-ref in .... 
    "_OBJC_CLASS_$_PCPieComponent", referenced from: 
     objc-class-ref in .... 
    "_OBJC_CLASS_$_UICKeyChainStore", referenced from: 
     objc-class-ref in ..... 
    "_kGAIScreenName", referenced from: 
     +[.... trackWithName:] in .... 
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

我试图删除这些框架和手动安装,但不成功,兼容性好,但我不知道是什么happening.Remove得出的数据并没有太多工作...有人能帮助我?

编辑:podfile

platform:ios, '7.0' 

inhibit_all_warnings! 

pod 'AFNetworking' 
pod 'MagicalRecord', '~> 2.3.0' 
pod 'GoogleAnalytics', '~> 3.13' 
pod 'iOSPlot', '~> 1.0.1' 
pod 'CSNotificationView', '~> 0.5.4' 
pod 'MACircleProgressIndicator', '~> 1.0.0' 
pod 'LTHPasscodeViewController', '~> 3.7.1' 
pod 'IQKeyboardManager', '~> 3.3.4' 
pod 'Rollbar' 
pod 'UICKeyChainStore', '~> 2.0.6' 

target 'xxxxx' do 
    pod 'OCMock', '~> 3.2' 
    pod 'OHHTTPStubs', '~> 4.3' 
end 
+0

您可以发布您Podfile吗? –

+0

@SvenDriemecker使用podfile编辑答案 – breadevelopment

+0

如果这是您的完整Podfile,请尝试将主要部分封装到目标'ABC'do ... end中。你的UnitTest-Target只有一个明确的目标部分。另外,如果您在上次工作后添加了新的Pod,请确保运行Pod安装,而不是仅更新Pod。 –

回答

0

你Podfile应该是这样的,有一个明确的目标定义和继承search_paths组为您单元测试目标(见official ref):

target ABC do 
    platform:ios, '7.0' 

    inhibit_all_warnings! 

    pod 'AFNetworking' 
    pod 'MagicalRecord', '~> 2.3.0' 
    pod 'GoogleAnalytics', '~> 3.13' 
    pod 'iOSPlot', '~> 1.0.1' 
    pod 'CSNotificationView', '~> 0.5.4' 
    pod 'MACircleProgressIndicator', '~> 1.0.0' 
    pod 'LTHPasscodeViewController', '~> 3.7.1' 
    pod 'IQKeyboardManager', '~> 3.3.4' 
    pod 'Rollbar' 
    pod 'UICKeyChainStore', '~> 2.0.6' 

    target 'xxxxx' do 
     inherit! :search_paths 
     pod 'OCMock', '~> 3.2' 
     pod 'OHHTTPStubs', '~> 4.3' 
    end 
end 

要如果您想要将任何新的pod集成到您的项目中(请参阅why),请务必运行pod install而不是仅运行pod update

你的最后一个选项是从扔在一边开始荚整合:

  1. 完全从项目中删除荚pod deintegrate
  2. 再集成豆荚与pod install