xcode dyld:库未加载:@executable_path/../Frameworks/

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30193682/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 07:07:41  来源:igfitidea点击:

dyld: Library not loaded: @executable_path/../Frameworks/

iosobjective-cswiftxcodedyld

提问by hunterp

Error:

错误:

dyld: Library not loaded: @executable_path/../Frameworks/n.framework/n Referenced from: /Users/hunterp/Library/Developer/CoreSimulator/Devices//data/Containers/Bundle/Application//Demo.app/Demo Reason: image not found

dyld:库未加载:@executable_path/../Frameworks/n.framework/n 引用自:/Users/hunterp/Library/Developer/CoreSimulator/Devices//data/Containers/Bundle/Application//Demo.app/Demo原因:找不到图片

I followed every answer in this stackoverflow question: iOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta

我遵循了这个 stackoverflow 问题中的每一个答案:iOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta

AND heres my build settings: enter image description here

和继承人我的构建设置: 在此处输入图片说明

采纳答案by ChikabuZ

  1. Try to select executable_path and press Delete enter image description here

  2. Also try the same with Library Search Paths and Header Search Paths

  3. If you have 2 targets try to edit your pod file:

    target :MainTarget, :exclusive => true do
    link_with ['Target1']
    
      pod 'SomePod'
    
    end
    
    target :SecondTarget, :exclusive => true do
    link_with ['Target2']
    
      pod 'SomePod'
    
    end
    
  1. 尝试选择executable_path并按Delete 在此处输入图片说明

  2. 也可以尝试使用 Library Search Paths 和 Header Search Paths

  3. 如果您有 2 个目标,请尝试编辑您的 pod 文件:

    target :MainTarget, :exclusive => true do
    link_with ['Target1']
    
      pod 'SomePod'
    
    end
    
    target :SecondTarget, :exclusive => true do
    link_with ['Target2']
    
      pod 'SomePod'
    
    end
    

and run in the terminal : pod update

并在终端中运行:pod update

  1. Also set Pods Debug and Release configuration to None enter image description here
  1. 还将 Pods Debug 和 Release 配置设置为 None 在此处输入图片说明

回答by James Webster

I suspect that there is something else wrong in your build settings as your error message contains extraneous slashes between directories

我怀疑您的构建设置中还有其他错误,因为您的错误消息包含目录之间的无关斜杠

/Users/hunterp/Library/Developer/CoreSimulator/Devices//data/Containers/Bundle/Application//Demo.app/Demo Reason: image not found
                                                      ^^                                  ^^

(which the syntax highlighting nicely points out when I format as code ;))

(当我格式化为代码时,语法突出显示很好地指出了这一点;))

When searching for the framework, it's possible that when it goes up a directory (with ..) it's parsing one of those //s not as you expect.

在搜索框架时,有可能当它进入一个目录(带有 ..)时,它解析的其中之一//可能与您预期的不同。

I'd check your header, framework and library search paths for entries that contain slashes where they are not needed, especially if they reference $(BUILDDIR)/1or similar

我会检查您的标头、框架和库搜索路径中是否包含不需要斜杠的条目,特别是如果它们引用$(BUILDDIR)/1或类似的



1. I can't remember the actual environment variables

1.我不记得实际的环境变量

回答by Mindy

I think the error

我认为错误

dyld: Library not loaded: @executable_path/../Frameworks/n.framework/n ...

dyld:库未加载:@executable_path/../Frameworks/n.framework/n ...

shows the Runpath Search Paths is set to be "@executable_path/../Frameworks".
Go to "Build Settings"->"Runpath Search Paths", delete "@executable_path/../Frameworks" if exists, then add "@executable_path/Frameworks".

显示运行路径搜索路径设置为“@executable_path/../Frameworks”。
转到“构建设置”->“运行路径搜索路径”,删除“@executable_path/../Frameworks”(如果存在),然后添加“@executable_path/Frameworks”。