Xcode 12 - No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64e armv7s arm64 arm7)
Solution 1
If you can't see "VALID_ARCHS" in BuildSettings. You can click the plus button.
click "Add User-Defined Setting"
Input setting name "VALID_ARCHS" , input value "arm64 arm64e armv7 armv7s x86_64"
Solution 2
Theorectically it should be enough changing debug from yes to no.
But as you said it did not work it must be that you have to set VALID_ARCHS
to what you have plus x86_64
.
Solution 3
M1 Mac: run Xcode in rosetta(by going to the .app file and clicking "get info" the click "open using rosetta"
Solution 4
Go to your App's target and select 64 bit standard architectures in Architectures section. See attached screenshot
Solution 5
run Xcode in rosetta(by going to the .app file and clicking "get info" the click "run under rosetta"
Pentagura
Updated on July 31, 2022Comments
-
Pentagura almost 2 years
Since I update Xcode to Xcode 12, I've got this error when I build :
Check dependencies No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64e armv7s arm64 arm7)
I try a lot of things :
- Uninstall/reinstall Pods via
pod install
Build Active Architecture Only
to No or to Yes for Debug and Release- Same thing for Pods project
Don't know what to do. This error come when I want to launch on iOS 14, but in iOS 13.7 this work perfectly without change.
-- EDIT --
I solve my problem by adding
arm64 arm64e armv7 armv7s x86_64
toVALID_ARCHS
, both in 'MyProject' and 'MyProjectTest', and it work now.-
M Zubair Shamshad over 3 yearstry to run on actual device, this issue is on simulator
-
Pentagura over 3 years@MZubairShamshad Ok I will test that, but how make it work on simulator ? I've not all Apple devices for real ^^
- Uninstall/reinstall Pods via
-
Pentagura over 3 yearsI haven't this choice to select, what does I need to do to add this ?
-
Ali Mehdi over 3 yearsAdd "$(ARCHS_STANDARD_64_BIT)" this in other option in Architectures
-
Ali Mehdi over 3 yearsDid you clean build?
-
Ali Mehdi over 3 yearswhat was your previous value for architectures?
-
Pentagura over 3 yearsStandard architectures - $(ARCHS_STANDARD)
-
Pentagura over 3 yearsI also try to put Debug to "No", but I haven't "VALID_ARCHS" in XCode, I don't found it
-
Hola Soy Edu Feliz Navidad over 3 years@Gargantua Pay attention on the top if it is showing all options or only the basic ones.
-
Pentagura over 3 yearsIt's the case, "All" is selected
-
Pentagura over 3 yearsThanks for your complete answer, but I doesn't work anymore... I precise it works since the beginning in a real device. The only problem is for emulator.
-
Pentagura over 3 yearsI finally solved the problem. I do exactly what you do, but for "MyProjectTest" to and now, it work !
-
Akhil over 3 years@Gargantua i also have this issue. i tried the same but still i am not able to run my app on simulators. Please help
-
Pentagura over 3 yearsAs I say, I only add what @ShaoJen Chen tell and it work ! I had those lines on"MyProject3" and "MyProject3Tests"
-
Umeumeume over 3 yearsI added the VALID_ARCHS in all(project,target,AppTest), but no luck for iOS simulator. it worked only for the device. Any help?
-
Umeumeume over 3 yearsI have this issue only on M1 MacbookAir, not on my iMac.
-
Xavier Ojeda Aguilar over 3 years@NonUmemoto same for me in my M1. I have this issue because I'm trying to solve other problem, but int he thread they suggest to use Build legacy, and when I tried to use that, I get this.
-
sejn over 2 yearsHow to run the app in rosetta
-
Naresh over 2 yearshow to achieve it, can add some screen shots.
-
Naresh over 2 yearsI have followed your steps and added
x86_64
inVALID_ARCHS
but no use. How to resolve in Xcode 12.2.... -
CyberMew almost 2 years@sejn You need to first have a M1 or M2 Mac to select that option as per the given answer. If you run Xcode in Rosetta, then the binaries will be running under 'Intel'. You can check by opening Activity Monitor, under the
Kind
column, see if it saysApple
orIntel
.