dyld Library not loaded Reason image not found 问题解决

简介: 添加第三方框架,然后启动app的时候会,提示dyld: Library not loaded: Reason: image not found网上大部分的做法都是把Build Phases 里对应framework后边的选项修改成为Optional,但这个是治标不治本,还是没法解决问题

前言

添加第三方框架,然后启动app的时候会,提示dyld: Library not loaded: Reason: image not found 网上大部分的做法都是把Build Phases 里对应framework后边的选项修改成为Optional,但这个是治标不治本,还是没法解决问题

原因

在生成Framework的时候, 缺省是生成了动态库 解决方法: 改成静态库就可以了

解决方案

我们需要做的是将这个framework拷贝到项目里面才行,这样才能从根本上解决问题,在Target的General选项卡里, 选择EmbeddedBinaries选项, 将找不到的framework添加进来




目录
相关文章
|
4月前
|
缓存 Ubuntu Linux
error while loading shared libraries: libxcb-icccm.so.4: cannot open shared object file: No such file or directory 问题如何处理
【5月更文挑战第16天】error while loading shared libraries: libxcb-icccm.so.4: cannot open shared object file: No such file or directory 问题如何处理
484 0
|
10月前
|
NoSQL MongoDB
mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No s
mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No s
402 0
|
关系型数据库 MySQL Linux
error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or
error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or
|
并行计算 Python
报错:OMP: Error #15: Initializing libomp.dylib, but found libiomp5.dylib already initialized.
报错:OMP: Error #15: Initializing libomp.dylib, but found libiomp5.dylib already initialized.
303 0
|
并行计算
解决Error #15: Initializing libiomp5.dylib, but found libomp.dylib already initialized.
解决Error #15: Initializing libiomp5.dylib, but found libomp.dylib already initialized.
382 0
|
Shell
Detected problems with app native libraries (please consult log for detail): lib.so: text relocation
Detected problems with app native libraries (please consult log for detail): lib.so: text relocation
150 0
原因及解决办法:error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file
原因及解决办法:error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file
310 0
error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or
error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or
102 0
How is dependent libraries defined in metadata loaded in the runtime
How is dependent libraries defined in metadata loaded in the runtime
144 0
How is dependent libraries defined in metadata loaded in the runtime
成功解决OSError: dlopen() failed to load a library: cairo / cairo-2 / cairo-gobject-2 / cairo.so.2
成功解决OSError: dlopen() failed to load a library: cairo / cairo-2 / cairo-gobject-2 / cairo.so.2
成功解决OSError: dlopen() failed to load a library: cairo / cairo-2 / cairo-gobject-2 / cairo.so.2