升级 Expo SDK
了解如何增量升级项目中的 Expo SDK 版本。
我们建议逐步升级 SDK 版本,一次一个。这样做将帮助你查明升级过程中出现的损坏和问题。
随着新 SDK 的发布,最新版本将进入当前发布状态。这适用于 Expo Go,因为它仅支持最新的 SDK 版本,并且不再支持以前的版本。我们建议将 开发构建 用于生产应用,因为 EAS 服务上旧 SDK 版本的向后兼容性往往会更长,但不会永远持续下去。
¥With a new SDK release, the latest version enters the current release status. This applies to Expo Go as it only supports the latest SDK version and previous versions are no longer supported. We recommend using development builds for production apps as the backwards compatibility for older SDK versions on EAS services tends to be much longer, but not forever.
如果你希望安装特定版本的 Expo Go,请访问 expo.dev/go。它支持 Android 设备/模拟器和 iOS 模拟器的下载。但是,由于 iOS 平台限制,只有最新版本的 Expo Go 可用于在物理 iOS 设备上安装。
¥If you are looking to install a specific version of Expo Go, visit expo.dev/go. It supports downloads for Android devices/emulators and iOS simulators. However, due to iOS platform restrictions, only the latest version of Expo Go is available for installation on physical iOS devices.
如何升级到最新的 SDK 版本
¥How to upgrade to the latest SDK version
1
3
Update native projects
- If you use Continuous Native Generation: Delete the android and ios directories if you generated them for a previous SDK version in your local project directory. They'll be re-generated next time you run a build, either with
npx expo run:ios
,npx expo prebuild
, or with EAS Build. - If you don't use Continuous Native Generation: Run
npx pod-install
if you have anios
directory. Apply any relevant changes from the Native project upgrade helper. Alternatively, you could consider adopting prebuild for easier upgrades in the future.
4
Follow the release notes for any other instructions
Read the SDK changelogs for the SDK version you are upgrading to. They contain important information about breaking changes, deprecations, and other changes that may affect your app. Refer to tue "Upgrading your app" section at the bottom of the release notes page for any additional instructions.
SDK Changelogs
Each SDK announcement release notes post contains information deprecations, breaking changes, and anything else that might be unique to that particular SDK version. When upgrading, be sure to check these out to make sure you don't miss anything.
- SDK 52: Release notes
- React Native 0.77 is available with Expo SDK 52. To upgrade, see these Release notes.
- SDK 51: Release notes
- SDK 50: Release notes
Deprecated SDK Version Changelogs
The following blog posts may included outdated information, but they are still useful for reference if you happen to fall far behind on SDK upgrades.
See a full list of deprecated SDK release changelogs
- SDK 49: Release notes
- SDK 48: Release notes
- SDK 47: Release notes
- SDK 46: Release notes
- SDK 45: Release notes
- SDK 44: Release notes
- SDK 43: Release notes
- SDK 42: Release notes
- SDK 41: Release notes
- SDK 40: Release notes
- SDK 39: Release notes
- SDK 38: Release notes
- SDK 37: Release notes
- SDK 36: Release notes
- SDK 35: Release notes