ios解决方案

dyld: Library not loaded: @rpath

2017-03-02  本文已影响47人  Mustard_Buli

最近自己打算写一个 Swift 的项目,之前都还好好的。今天进行真机测试的时候报出了这样的错误:

dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/AppName.app/AppName
  Reason: no suitable image found.  Did find:
    /private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/AppName.app/Frameworks/libswiftCore.dylib: mmap() error 1 at
address=0x008A1000, size=0x001A4000 segment=__TEXT in Segment::map() mapping
/private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/APPLICATION_NAME/Frameworks/libswiftCore.dylib

Stack Overflow 上查了一下,发现是 CocoaPods 的问题。并且找到了几种解决方法:

  1. clean 一下,重新调试就好了。
  2. 更改一下设置,改成『Yes』,之后clean一下。(我就是通过这个方法弄好的)
  1. project 中在 Runpath Search Paths 添加 @executable_path/Frameworks

如果还有什么其他的解决方案,希望能够分享~

上一篇 下一篇

猜你喜欢

热点阅读