美文网首页ios解决方案
dyld: Library not loaded: @rpath

dyld: Library not loaded: @rpath

作者: Mustard_Buli | 来源:发表于2017-03-02 11:01 被阅读47次

最近自己打算写一个 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

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

相关文章

网友评论

    本文标题:dyld: Library not loaded: @rpath

    本文链接:https://www.haomeiwen.com/subject/peyhgttx.html