• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

ios - 架构 i386 的 undefined symbol - 来自 podfile 的所有项目

[复制链接]
菜鸟教程小白 发表于 2022-12-13 05:24:52 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

我收到以下关于 Restkit 的错误,但是 reskit 是使用 cocoapods 添加的。我尝试了很多解决方案,但似乎找不到正确的解决方案。有谁知道我做错了什么?

错误信息:

ld: warning: directory not found for option '-L/Users/ME/Documents/proj'
    ld: warning: directory not found for option '-Lcopy/projIOSProjectNew/projIOSWorkspace/projIOSCore/build/Debug-iphoneos'
    ld: warning: directory not found for option '-Ldev'
    ld: warning: directory not found for option '-Lnewest/projIOSProjectNew/projIOSWorkspace/Pods/build/Debug-iphoneos'
    Undefined symbols for architecture i386:
      "_AFNetworkingOperationDidFinishNotification", referenced from:
          -[RKObjectRequestOperationLogger init] in libPods-projIOSCore-RestKit.a(RKObjectRequestOperation.o)
      "_AFNetworkingOperationDidStartNotification", referenced from:
          -[RKObjectRequestOperationLogger init] in libPods-projIOSCore-RestKit.a(RKObjectRequestOperation.o)
      "_AFNetworkingOperationFailingURLRequestErrorKey", referenced from:
          -[RKHTTPRequestOperation error] in libPods-projIOSCore-RestKit.a(RKHTTPRequestOperation.o)
      "_AFNetworkingOperationFailingURLResponseErrorKey", referenced from:
          -[RKHTTPRequestOperation error] in libPods-projIOSCore-RestKit.a(RKHTTPRequestOperation.o)
      "_OBJC_CLASS_$_AFHTTPClient", referenced from:
          objc-class-ref in libPods-PROJIOSCore-RestKit.a(RKObjectManager.o)
      "_OBJC_CLASS_$_AFHTTPRequestOperation", referenced from:
          objc-class-ref in libPods-PROJIOSCore-RestKit.a(RKHTTPRequestOperation.o)
          _OBJC_CLASS_$_RKHTTPRequestOperation in libPods-projIOSCore-RestKit.a(RKHTTPRequestOperation.o)
          objc-class-ref in libPods-PROJIOSCore-RestKit.a(RKObjectRequestOperation.o)
      "_OBJC_CLASS_$_AFJSONRequestOperation", referenced from:
          objc-class-ref in libPods-projIOSCore-RestKit.a(RKObjectManager.o)
      "_OBJC_CLASS_$_AFNetworkActivityIndicatorManager", referenced from:
          objc-class-ref in libPods-projIOSCore-RestKit.a(RKObjectRequestOperation.o)

编辑:我还收到以下警告,这是丢失的文件。

d: warning: ld: warning: ld: warning: ignoring file /Users/ME/Library/Developer/Xcode/DerivedData/MYWORKSPACE-bceskqnbpsdarjfijbrjozdfciem/Build/Products/Debug-iphonesimulator/libPods-RewoIOSCore-ISO8601DateFormatterValueTransformer.a, file was built for archive which is not the architecture being linked (i386): 

Podfile 如下所示:

    workspace 'projIOSWorkspace.xcworkspace'
xcodeproj 'projIOSCore/projIOSCore.xcodeproj'
xcodeproj 'projIOS2Project/projIOS2Project.xcodeproj'
xcodeproj 'projmobileiosproject/projIOSProject.xcodeproj'


#source 'https://github.com/CocoaPods/Specs.git'

target :projIOSCore  do
    platform :ios, '8.0'

    pod 'RestKit', '~> 0.24.0'

    xcodeproj 'projIOSCore/projIOSCore.xcodeproj'
end


target :projIOS2Project do
    platform :ios, '8.0'

    pod 'RestKit', '~> 0.24.0'

    # Include optional Testing and Search components
    pod 'RestKit/Testing'
    pod 'RestKit/Search'
    pod 'FMDB'
    pod 'ZBarSDK', '~> 1.3'
    pod 'MZFormSheetController', '~> 2.3'
    pod 'CTCheckbox', '~> 0.0'
    pod 'MGSwipeTableCell', '~> 1.1.1'
    pod 'FormatterKit', '~> 1.7'
    pod 'TSMessages'
    pod 'DLAlertView', '~>1.2.4'
    pod 'SIAlertView', '~> 1.3'
    pod 'MBProgressHUD', '~> 0.8'

    xcodeproj 'projIOS2Project/projIOS2Project.xcodeproj'
end

target :projIOSProject do
    platform :ios, '8.0'

    pod 'RestKit', '~> 0.24.0'

    # Include optional Testing and Search components
    pod 'FMDB'
    pod 'ZBarSDK', '~> 1.3'
    pod 'AFPopupView', '~> 1.0'
    pod 'ubNub', '3.6.1'
    pod 'ChameleonFramework'
    pod 'SGActionView', '~> 0.0'
    pod 'RXPromise', '~> 0.13'
    pod 'SWTableViewCell', '~> 0.3.6'
    pod 'UIAlertView+Blocks'
    pod 'CNPPopupController'

    xcodeproj 'projmobileiosproject/projIOSProject.xcodeproj'
end



Best Answer-推荐答案


如果事情最终变得一团糟,我会尝试使用以下步骤重新安装您的 CocoaPods 依赖项:

  • 检查您的 Podfile 是否正确引用了您应用的目标。
  • 打开目标的 Build Phases 选项卡并找到“Link Binary with Libraries”。移除 CocoaPods。

enter image description here

  • 删除 .workspace 文件
  • 删除 Pods/目录
  • 再次运行 pod install

关于ios - 架构 i386 的 undefined symbol - 来自 podfile 的所有项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28597642/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap