Cocoapods dyld:未找到的@rpath图像库。

时间:2021-12-22 02:45:47

I am currently using Xcode 8.1, cocoa pods 1.2.0.beta.1, and launching my app on a simulator with iOS 10.1. My app builds just fine, however after launching the app in a simulator, I receive the following error:

我目前使用的是Xcode 8.1, cocoa pods 1.2.0.beta。1,用iOS 10.1在模拟器上启动我的app。我的app可以很好地构建,但是在模拟器中启动app后,我收到了如下错误:

dyld: Library not loaded: @rpath/AFNetworking.framework/AFNetworking
  Referenced from:            /Users/XXXXX/Library/Developer/CoreSimulator/Devices/XXXXX/data/Containers/Bundle/Application/XXXXX/XXXXX.app/XXXXX
  Reason: image not found

My Podfile is:

我的Podfile是:

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
platform :ios, '8.0'

target "XXXXX" do
    platform :ios, '8.0'
    use_frameworks!

    pod 'AFNetworking'
    ...

end

post_install do | installer |
    require 'fileutils'
    FileUtils.cp_r('Pods/Target Support Files/Pods-XXXXX/Pods-XXXXX-acknowledgements.plist', 'Pods-Acknowledgements.plist', :remove_desve_destination => true)
end

I have already tried de-integrating and re-installing my cocoa pods, changing the Pods-XXXXX.framework to optional, disabling Bitcode, and cleaning the workspace. None of those options (or any combination of them) has worked. Any help is much appreciated.

我已经尝试了去集成和重新安装cocoa pods,将pods - xxxx .framework更改为可选的、禁用的位码,并清理工作区。这些选项(或它们的任何组合)都没有起作用。非常感谢您的帮助。

1 个解决方案

#1


5  

For those who find this issue in the future, it has been solved by cleaning the build folder by doing Option+Shift+Command+K. This solves the issue.

对于那些在未来发现这个问题的人来说,通过选择+Shift+Command+K来清理构建文件夹已经解决了这个问题。这解决了问题。

#1


5  

For those who find this issue in the future, it has been solved by cleaning the build folder by doing Option+Shift+Command+K. This solves the issue.

对于那些在未来发现这个问题的人来说,通过选择+Shift+Command+K来清理构建文件夹已经解决了这个问题。这解决了问题。