Dependency Error in Macbook Pro m1 Xcode 12.5.1 Version in my Other Macbook Air that code is working fine but in Macbook Pro m1 it's giving me this error.

No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=x86_64, EXCLUDED_ARCHS=(   arm64 )).

You have requested to build and run your app on an arm64 device, but you have chosen to exclude arm64 from the build, so the complier has nothing to build. Why are you trying to exclude arm64? This choice is almost always wrong except in carefully considered situations.

Often, excluding arm64 is done to work around a dependency that's not updated for Apple silicon. If that's the reason you're excluding this architecture, you should undo this change and start over on solving that problem by first getting an updated version of the dependency that supports Apple silicon as the correct way of resolving that issue.

First,we meet compile error:building for iOS Simulator, but linking in object file built for iOS, file 'xxxxx/Pods/xxxx.a' for architecture arm64.

Then,found many tutorial told that can be solved by add excluding arm64.

Then,we meet this:No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=arm64 arm64e i386 x86_64, EXCLUDED_ARCHS=( arm64 )).

so,how to fix it ?

Dependency Error in Macbook Pro m1 Xcode 12.5.1 Version in my Other Macbook Air that code is working fine but in Macbook Pro m1 it's giving me this error.
 
 
Q