1农尖、dyld: Library not loaded: @rpath/EasyVaasVR.framework/EasyVaasVR
完整實(shí)例:
dyld: Library not loaded: @rpath/EasyVaasVR.framework/EasyVaasVR
Referenced from: /private/var/mobile/Containers/Bundle/Application/37429DB7-3C1B-49D2-B0B4-B58DE8464811/EVVRDemo.app/EVVRDemo
Reason: image not found
原因是需要在target->General->embedded Binaries 里面將報(bào)錯(cuò)的framework加進(jìn)去
2恬惯、"_namexxxxxxx", referenced from: -[classxxx moviePlayBackFinish:] in classxxx.o
錯(cuò)誤事例:
"_IJKMPMoviePlayerPlaybackDidFinishReasonUserInfoKey", referenced from:
-[EldenPlayerView moviePlayBackFinish:] in EldenPlayerView.o
錯(cuò)誤原因:_namexxxxxxx 定義了但是沒有實(shí)現(xiàn) 比如在鳍寂。h文件定義了
extern NSString* const aStr;
但是沒有在.m中實(shí)現(xiàn)
NSString *const aStr = @"11111111111";
解決辦法:
1蝌衔、在對(duì)應(yīng)的.m文件中實(shí)現(xiàn)NSString *const aStr = @"11111111111";
2、在.h里面不定義一忱,直接就實(shí)現(xiàn)NSString *const aStr = @"11111111111";
3听皿、reason: '*** Collection 《xxArray: 0x608000055d50》 was mutated while being enumerated.'
錯(cuò)誤示例:
for (id obj in _labelRoomNumber.layer.sublayers) {
if ([obj isMemberOfClass:[CAGradientLayer class]]) {
[obj removeFromSuperlayer];
}
}
[_labelRoomNumber.layer addSublayer:gradientLayer];
錯(cuò)誤原因:
因?yàn)橐贿叡憷麛?shù)組,又同時(shí)修改這個(gè)數(shù)組里面的內(nèi)容静檬,導(dǎo)致崩潰
解決方法:
這個(gè)就看怎么實(shí)現(xiàn)炭懊,比較多,比如先將符合條件的數(shù)據(jù)存起來拂檩,等遍歷結(jié)束之后在去處理
可參考這篇文章
4侮腹、Apple Mach-O Linker (ld) Error Group
clang: error: linker command failed with exit code 1 (use -v to see invocation)
這種點(diǎn)不進(jìn)去的錯(cuò)誤,目前遇到的原因是
1稻励、修改一個(gè)類名的時(shí)候和另一個(gè)類名相同父阻,這種原因的話,需要自己去排查究竟是那個(gè)名字相同
2望抽、可能是不支持bitcode 嘗試在build setting 中搜索 “enable bitcode“ 將YES改為NO
5加矛、/Users/xxxx/Pods/Target Support Files/Pods-xxx/Pods-xxx-frameworks.sh: line 132: ARCHS[@]: unbound variable
錯(cuò)誤示例:
sent 598681 bytes received 70 bytes 1197502.00 bytes/sec
total size is 599078 speedup is 1.00
/Users/xxx/Pods/Target Support Files/Pods-xxx/Pods-xxx-frameworks.sh: line 132: ARCHS[@]: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code
1、用真機(jī)可以運(yùn)行糠聪, 模擬器運(yùn)行報(bào)這個(gè)錯(cuò)荒椭。是由于setting中的設(shè)置錯(cuò)誤。
錯(cuò)誤配置:
修改后:TARGETS---->Build Settings -----搜索:VALID_ARCHS
添加模擬器支持架構(gòu):x86_64
完整結(jié)構(gòu)為:arm64 arm64e armv7s x86_64
2舰蟆、模擬器能運(yùn)行趣惠,真機(jī)報(bào)錯(cuò)
如下圖,把Excluded Architectures的相關(guān)設(shè)置去掉