iOS 错误汇总

  1. Xcode11.2编译报错,报错如下
error: Multiple comands product 'xxx/Info.plist'
1)Target'xxx'(project 'xxx') has copy command from 'xxx/Info.plist'
2)Target'xxx'(project 'xxx') has process command with output 'xxx/Info.plist'

解决:


  1. xcode编译报错,报错如下
undef: _res_9_getservers
undef: _res_9_ninit
undef: _res_9_ndestroy

解决:
Build Phases,新增库libresolv

  1. pod install报错,报错如下
$ pod install
Analyzing dependencies
[!] CDN: trunk Repo update failed - 2 error(s):
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/4/a/4/fishhook/0.1/fishhook.podspec.json Response: Timeout was reached
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/4/a/4/fishhook/0.2/fishhook.podspec.json Response: Timeout was reached

解决:

  1. podfile文件中添加指定source源为master,并保存
    source 'https://github.com/CocoaPods/Specs.git'
  2. 终端执行移除trunk源
    pod repo remove trunk
  3. 执行完成之后,再执行pod searchorpod install可以正常进行
  4. podfile文件中一定要指定master源,因为现在默认是trunk源
    source 'https://github.com/CocoaPods/Specs.git'
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容