This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
原生项目升级助手
查看你需要对原生项目进行的所有更改的逐个文件差异,以将其升级到下一个 Expo SDK 版本。
如果你管理你的原生项目(android 和 ios 目录),要升级到最新的 Expo SDK,你必须对你的原生项目进行更改。找到哪些原生文件需要更改以及在文件中更新什么可能是一个复杂的过程。
🌐 If you manage your native projects (android and ios directories), to upgrade to the latest Expo SDK, you have to make changes to your native projects. It can be a complex process to find which native file changes and what to update in which file.
以下指南提供了差异对比,用于比较你项目当前 SDK 版本与你想要升级的目标 SDK 版本之间的原生项目文件。你可以根据项目使用的 expo 包版本使用这些差异来修改项目。本页面的工具类似于 React Native Upgrade Helper,但它们主要面向使用 Expo 模块及相关工具的项目。
🌐 The following guide provides diffs to compare native project files between your project's current SDK version and the target SDK version you want to upgrade. You can use them to make changes to your project depending on the expo package version your project uses. The tools on this page are similar to React Native Upgrade Helper. However, they are oriented around projects that use Expo modules and related tooling.
想完全避免升级原生代码吗?请参阅 Continuous Native Generation (CNG) 了解 Expo Prebuild 如何在构建之前生成你的原生项目。
升级原生项目文件
🌐 Upgrade native project files
一旦你升级了你的 Expo SDK 版本和相关依赖,请使用下面的差异工具了解你需要对原生项目进行的更改,并将它们更新到当前的 Expo SDK 版本。
🌐 Once you have upgraded your Expo SDK version and related dependencies, use the diff tool below to learn about changes you need to make to your native project and bring them up to date with the current Expo SDK version.
选择你的 起始 SDK 版本 和 目标 SDK 版本 来查看生成的差异。然后,通过复制粘贴或者手动修改项目文件,将这些更改应用到你的本地项目中。
🌐 Choose your from SDK version and to SDK version to see the generated diff. Then, apply those changes to your native projects by copying and pasting or manually making changes to the project files.
From SDK version:
To SDK version:
Native code changes from SDK 56 to 57
Upgrading with an AI agent?
Copy a ready-to-run prompt with the full diff and apply instructions, then paste it into your AI assistant to update your native projects configuration.
| 2 | 2 | "name": "expo-template-bare-minimum", |
| 3 | 3 | "description": "This bare project template includes a minimal setup for using unimodules with React Native.", |
| 4 | 4 | "license": "0BSD", |
| 5 | "version": "56.0.26", | |
| 5 | "version": "57.0.3", | |
| 6 | 6 | "main": "index.js", |
| 7 | 7 | "scripts": { |
| 8 | 8 | "start": "expo start --dev-client", |
| 11 | 11 | "web": "expo start --web" |
| 12 | 12 | }, |
| 13 | 13 | "dependencies": { |
| 14 | "expo": "~56.0.12", | |
| 15 | "expo-status-bar": "~56.0.4", | |
| 14 | "expo": "~57.0.1", | |
| 15 | "expo-status-bar": "~57.0.0", | |
| 16 | 16 | "react": "19.2.3", |
| 17 | "react-native": "0.85.3" | |
| 17 | "react-native": "0.86.0" | |
| 18 | 18 | }, |
| 19 | 19 | "publishConfig": { |
| 20 | 20 | "executableFiles": [ |
| 21 | 21 |