首页指南参考教程

EAS 构建限制

了解 EAS Build 当前的限制。


EAS Build 旨在适用于任何 React Native 项目。但是,最好了解我们计划解决的某些限制,因为它们可能会阻止你在应用中使用该服务或可能造成不便。

¥EAS Build is designed to work for any React Native project. However, it is good to be aware of certain limitations that we plan to address since they could prevent you from being able to use the service for your applications or might cause an inconvenience.

修复了构建工作服务器上的内存和 CPU 限制

¥Fixed memory and CPU limits on build worker servers

如果你的构建过程需要大量内存,则可用资源可能不足以构建你的应用。在这种情况下,请考虑在 eas.json 中使用 large 资源类。参见 Android 特定的资源类iOS 特定的资源类

¥The resources available might be insufficient to build your app if your build process requires a significant amount of memory. In this case, consider using a large resource class in the eas.json. See Android-specific resource class and iOS-specific resource class.

请参阅 服务器基础架构参考 了解更多信息。它包含有关 Android (Ubuntu) 和 iOS (macOS) 构建服务器当前规范的最新信息。

¥See Server infrastructure reference for more information. It contains the most up-to-date information about the current specifications of the Android (Ubuntu) and iOS (macOS) build servers.

有限的依赖缓存

¥Limited dependency caching

Android 的构建作业从本地缓存安装 npm 和 Maven 依赖。iOS 的构建作业从本地缓存安装 npm 依赖,但 CocoaPods 还没有缓存。

¥Build jobs for Android install npm and Maven dependencies from a local cache. Build jobs for iOS install npm dependencies from a local cache, but there is no caching for CocoaPods yet.

node_modules 目录这样的中间工件不会被缓存和恢复(例如:基于 yarn.lockpackage-lock.json),但是如果你将它们提交到 git 存储库,那么它们将被上传到构建服务器。

¥Intermediate artifacts like node_modules directories are not cached and restored (eg: based on yarn.lock or package-lock.json), but if you commit them to your git repository then they will be uploaded to build servers.

请参阅 依赖缓存 了解更多信息。

¥See dependency caching for more information.

最长构建持续时间为 2 小时

¥Maximum build duration of 2 hours

如果你的构建运行时间超过 2 小时,它将被取消。免费计划的此限制较低,并且该限制将来可能会发生变化。

¥If your build takes longer than 2 hours to run, it will be canceled. This limit is lower on the free plan, and the limit is subject to change in the future.

建议将 Yarn Workspaces 用于 monorepos;官方对其他人的指导是有限的

¥Yarn Workspaces is recommended for monorepos; official guidance for others is limited

虽然如果你愿意深入研究并了解工具并亲自动手,那么你可能可以使用 Nx 等其他 monorepo 工具取得成功,但 Expo 团队将无法提供有关这些工具的支持和指导。我们建议使用 Yarn 工作区,因为它是我们目前唯一提供一流集成的 monorepo 工具。

¥While you likely can have success using other monorepo tools like Nx if you are willing to dig in and understand the tooling and get your hands dirty, the Expo team will be unable to provide support and guidance on those tools. We recommend using Yarn Workspaces because it is the only monorepo tool that we provide first-class integration with at the moment.

不支持 SDK 40 及更低版本上的托管工作流项目

¥Managed workflow projects on SDK 40 and below are not supported

EAS Build 支持构建 iOS/Android 原生项目,因此它可以与任何 React Native 应用配合使用。仅 SDK 41 及更高版本支持 Expo 项目管理。为了获得最佳结果,我们建议使用最新的 SDK 版本,或至少 SDK 43。

¥EAS Build supports building iOS/Android native projects, so it works with any React Native app. Support for Managed Expo projects is only available for SDK 41 and higher. For best results, we recommend using the latest SDK version, or at least SDK 43.

收到有关更改的通知

¥Get notified about changes

要在这些项目取得进展时收到通知,你可以订阅 expo.dev/eas 的 EAS 新闻通讯。

¥To be notified as progress is made on these items, you can subscribe to the EAS newsletter on expo.dev/eas.

Expo 中文网 - 粤ICP备13048890号