Xcode12 simulator compilation error
After upgrading Xcode to 12.0.1, the following error occurred in simulator compilation
Could not find module ‘xxxxxxx’ for target ‘arm64-apple-ios-simulator’; found: x86_ 64-apple-ios-simulator, x86_ 64
many methods have been found on the Internet, but they can’t be solved. Later, they have been solved through research. Here’s a record
First of all, make clear the concept
There is an architecture option in
- Xcode, and its value is standard architectures – $(arcs)_ Standard) is (armv7 and arm64) in real machine compilation, and (x86) in simulator compilation_ If the build active architectures only option in Xcode is yes, it means that only the current architecture will be compiled. For real computers, it is generally arm64, and the emulator is usually x86_ 64. If it is no, it means that the supported architectures are compiled at the same time. The exclusive architectures option in Xcode of the above architectures means that the excluded architectures are filled in here. Therefore, if arm64 is used here, it means that you do not want to compile the valid in Xcode_ As for the arcs option, it’s the current effective architecture (I’m also dizzy. Apple is so complicated that it needs this when it has 1). Generally, the value filled in here is the same as 1 OL>
So here comes the question…. The problem I encountered was that I filled in arm64 arm64e in 4, so the compiler simulator kept reporting errors, and then changed all kinds of things, including the architecture of the third Library in pods.
Solution
although Standard Architecture (x86) is set in 1_ However, the effective architecture in 4 is arm64, arm64e, so only arm64 can be used for the simulator. (it is said that the simulator of xcode12 supports arm64, but my computer is i5, so this one doesn’t use arm64). So the module he compiled is for ‘arm64 Apple IOS simulator’, but the simulator is found: x86_ 64-apple-ios-simulator。 So I made a mistake
Pod component
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.name == 'Debug'
config.build_settings["VALID_ARCHS"] = "arm64 arm64e x86_64 i386"
else
config.build_settings["VALID_ARCHS"] = "arm64 arm64e"
end
end
end
end
Finally, the project clean recompile, OK
Read More:
- Android studio simulator architecture choose arm or x86 to solve the problem of missing libraryexception
- Error reported by ISE simulator: ERROR:Simulator : 861 – failed to link the design solution
- ISE simulator reported an error: ERROR:Simulator : 861 – failed to link the design solution
- Python learning notes (5) — cross entropy error runtimeerror: 1D target tensor expected, multi target not supported
- Xcode 12 compiles and reports errors on simulator
- Solution to Apple Wireless Mouse, keyboard or touchpad can not be recognized by MAC
- Failed to find target with hash string ‘android-25’ in:D:\SDK
- [Android] – Android studio + carefree simulator
- Failed to find target with hash string”android-21″ in:D:\AndroidVersionSdk
- Oserror: [winerror 126] the specified module was not found. Pytoch couldn’t find caffe2_ detectron_ ops.dll
- Using Mocha to test can not find module ‘. /build/release/scrypt’ (Fixed)
- Solve the problem that target code version of Maven project sub module in IntelliJ idea is always rolled back
- Reset power on password of lightning simulator
- Appium connecting to the ADB 5037 port of nocturnal simulator is occupied by itself
- Xcode compilation error: failed to initiate service connection to simulator
- Android Error | Failed to find target with hash string ”android-23′ in…
- Module build failed: error: cannot find module ‘node sass’ error
- Wrong path to add PCH file. Apple llvm 9.0 – language cannot be found in the new project
- Perfectly solve the problem of NPM start error: cannot find module ‘XX’
- NPM- Cannot find module ‘xxxxx’