Emulator compilation error

1.Could not find module ‘xxx’ for target ‘x86_64-apple-ios-simulator’; Found: arm64, arm64-apple-ios-simulator error

  • Reason: The simulator cannot find x86 architecture, mainly because the M1 chip does not support x86_64 architecture.
  • Environment: the real machine runs normally, simulation error, xcode12.4,M1 chip.
  • Solution: In the application, select Xcode -> right-click to display the introduction, select Open with Rosetta -> Reopen Xcode, and compile successfully.
  • When opened with Rosetta, the translation supports x86_64 architecture.