由于我将Xcode更新为Xcode 12,所以在构建时出现以下错误:

Check dependencies
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64e armv7s arm64 arm7)

我try 了很多东西:

  • 通过pod install卸载/重新安装Pods
  • Build Active Architecture OnlyNoDebugReleaseYes
  • Pods项目也是如此

不知道该怎么办.当我想在iOS 14上启动时,会出现这个错误,但在iOS 13.7中,这个错误完全可以正常工作,没有任何改变.

-- EDIT --

我通过在"MyProject"和"MyProjectTest"中添加arm64 arm64e armv7 armv7s x86_64VALID_ARCHS来解决我的问题,现在它可以工作了.

推荐答案

如果在BuildSettings中看不到"VALID_arch".

enter image description here

单击"添加用户定义的设置"

enter image description here

输入设置名称"有效",输入值"arm64 arm64e armv7 armv7s x86_64"

enter image description here enter image description here

React-native相关问答推荐

Appcenter构建失败错误号::EEXIST -文件存在于syserr_fail2_in

导航到另一个屏幕后清空搜索屏幕

React Native:任务 ':app:checkDebugDuplicateClasses' 执行失败

是否有用于react-native 的简单同步存储选项?

React Navigation v5 中的初始路由参数?

在react-native 应用程序中使用中继

异步(async)/等待(await)和递归

为 React Native TextInput 创建 ref 时出现 TypeScript 问题

如何在 React Native 中删除警告

使用 Bearer身份验证令牌react native图像

在 Windows 上进行本机调试

Yarn 在哪里存储离线包?

React Native with Typescript and Jest 在 0.57 更新后被 destruct :Couldn't find preset "module:metro-react-native-babel-preset" relative to directory

React native expection java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/{package}/lib-main/libgnustl_shared.so" is 32-bit instead of 64-bit

为什么,确切地说,我们需要 React.forwardRef?

如何使用特定目标运行 react-native run-ios

如何在自定义组件上使用 onPress?

React Native:文本 node 的 Auto宽度

如何在 React 中将函数与钩子绑定?

React-Native 获取 XML 数据