记录各种报错错误

一:iOS导入动态库提示Reason:image not found

image.png

解决方法可见链接:https://www.jianshu.com/p/bed94ddacfa8

二:

Multiple methods named 'count:' found with mismatched result, parameter type or attributes

image.png

翻译后得知:编译器找不到对应的count的合适方法,从而出现报错。只需要在函数前面转换一下类型就可以了,告诉编译器指定的地方,从而调用合适的方法。

return [(NSMutableArray *)self.dataColList[section] count];

三:项目报clang错误,而且无法点击查看错误信息

/clang:-1: linker command failed with exit code 1 (use -v to see invocation)

image.png

相关链接:
https://www.jianshu.com/p/03aec7c4867d
http://www.cnblogs.com/xsyl/p/6085844.html

最后解决方案

  1. ”Build Settings”->”Enable Bitcode”设置为NO ,因为有些SDK不支持Bitcode
  2. 把Other Linker Flags下的属性全删除了。(删除之后打包会很慢。)
  3. 设置打包模式为Release "product"->"scheme"->"Edit Scheme"
    检查 Run下的 Build Configuration 是否为Release
    检查Archive下的 Build Configuration 是否为Release
    原文:https://blog.csdn.net/qq_39342142/article/details/86476778

四:使用上面的方法修改之后发现还没有解决问题,点击下面的地方查看报错。

image.png

报错为:
Undefined symbols for architecture arm64:
"OBJC_CLASS$_CMMotionManager", referenced from:
objc-class-ref in AlipaySDK
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
image.png

其实是缺少了CoreMotion.framework库,添加上去就好了。

解决方式Podfile:
install! 'cocoapods', :disable_input_output_paths => true

报错信息:

Showing Recent Errors Only
Multiple commands produce '/Users/dongxuejiao/Library/Developer/Xcode/DerivedData/YouJiEdu-efjfqsenoufuopfnezibyvuotohd/Build/Products/Debug-iphoneos/YouJiEdu.app/Assets.car':

  1. Target 'YouJiEdu' (project 'YouJiEdu') has compile command with input '/Users/dongxuejiao/Desktop/ydkt/dev-indenp/YouJiEdu/YouJiEdu/Assets.xcassets'
  2. That command depends on command in Target 'YouJiEdu' (project 'YouJiEdu'): script phase “[CP] Copy Pods Resources”
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容