关于导入第三方库的一个经典错误

⚠️Undefined symbols for architecture x86_64:不能运行在X86_64这个架构上

  • 模拟器架构
    • i386 —iPhone4s / 5 32位
    • x86_64 — iPhone 5s / 6 / 6p / 6s / 6sp 64位
  • 真机架构
    • armv7 —iPhone4s - 32位
    • armv7s ---iPhone 5 -32位
    • arm64 -----iPhone 5s / 6 / 6p / 6s / 6sp -- 64位
  • 查看架构
    • lipo - info xxx.a
      -解决方案:
  • 合并架构
    • 终端CD到俩个.a文件夹的上一个目录 lipo - create xxxx.a yyy.a - output xxxNew.a
    • 点击项目,点击build settings architecture build active architecture only debug yes———>no
  • 优点:程序员不需要切换包
  • 缺点:体积增大
  • Debug:开发阶段使用 有丰富的调试代码 运行效率比较低
  • Release:上线阶段使用 基本没有调试代码 运行效率高

你可能感兴趣的:(关于导入第三方库的一个经典错误)