iOS编译报错

321 阅读1分钟

模拟器编译报错

1.Could not find module 'xxx' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator 报错

  • 原因:模拟器找不到x86的架构,主要是因为M1的芯片不支持x86_64架构。
  • 环境:真机运行正常,模拟报错,xcode12.4,M1的芯片。
  • 解决方案:在应用程序中选中xcode->右键显示简介,选中使用Rosetta打开 ->重新打开Xcode,编译成功。
  • 使用Rosetta打开,会翻译支持x86_64架构。