This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
创建项目
了解如何创建新的 Expo 项目。
Expo 是一个 React Native 框架,使开发 Android 和 iOS 应用更容易。我们的框架提供基于文件的路由、原生模块的标准库,以及更多功能。Expo 是开源的,并且在 GitHub 和 Discord 上有活跃的社区。
🌐 Expo is a React Native framework that makes developing Android and iOS apps easier. Our framework provides file-based routing, a standard library of native modules, and much more. Expo is open source with an active community on GitHub and Discord.
我们还提供 Expo 应用服务 (EAS),这是一套在开发过程的每个环节中补充 Expo 框架的服务。
🌐 We also make Expo Application Services (EAS), a set of services that complement the Expo framework in each step of the development process.
信息 编程新手? 你可以通过提示 AI 编程代理来构建你的第一个 Expo 应用,而不必编写代码。请参阅 使用 AI 构建教程。它涵盖了从零开始的设置。
系统要求
🌐 System requirements
- Node.js(长期支持版)。
- 支持 macOS、Windows(Powershell 和 WSL 2)以及 Linux。
从默认项目开始
🌐 Start with a default project
我们建议从 create-expo-app 创建的默认项目开始。默认项目包含示例代码,以帮助你入门。
🌐 We recommend starting with the default project created by create-expo-app. The default project includes example code to help you get started.
要创建新项目,请运行以下命令:
🌐 To create a new project, run the following command:
你可以通过添加
--template选项来选择不同的模板。
从一个例子开始
🌐 Start from an example
你可以不使用默认项目,而是从其中一个 Expo 示例 开始。这些都是小型应用,每个示例演示一个特定的功能或集成,例如 Expo Router、Expo Widgets 或摄像头界面。
🌐 Instead of the default project, you can start from one of the Expo examples. These are small apps that each demonstrate a specific feature or integration, such as Expo Router, Expo Widgets, or a camera screen.
要浏览完整列表并互动地选择一个,请运行 create-expo-app 并使用 --example 选项且不指定名称:
🌐 To browse the full list and pick one interactively, run create-expo-app with the --example option and no name:
要直接创建一个已知示例,请传入其名称:
🌐 To create a known example directly, pass its name:
信息 本 “入门” 部分的其余指南遵循默认项目。示例应用可能组织方式不同,但概念是相同的。
设置一个AI代理
🌐 Set up an AI agent
一个新项目包含 AGENTS.md,里面有 AI 代理的项目背景。当安装 Claude Code 时,它还会包含 .claude/settings.json 来启用 Expo 插件。Claude Code 和 Codex 都有官方的 Expo 插件。使用一个命令,你可以安装 Expo Skills 并注册 Expo 模型上下文协议 (MCP) 服务器:
🌐 A new project includes AGENTS.md with project context for AI agents. When Claude Code is installed, it also includes .claude/settings.json to enable the Expo plugin. Claude Code and Codex have an official Expo plugin. Using one command, you can install Expo Skills and register the Expo Model Context Protocol (MCP) Server:
然后在你的 Claude Code 会话中运行 /mcp 来登录你的 Expo 账号。
🌐 Then run /mcp inside your Claude Code session to sign in to your Expo account.
然后登录你的 Expo 账号:
🌐 Then sign in to your Expo account:
这个插件还会安装一个技能,教代理在新的 Expo 项目里文件的位置:
🌐 The plugin also installs the skill that teaches an agent where files live in a new Expo project:
Folder structure for a new Expo app.
对于 Cursor 和其他代理,请分别安装 Expo Skills 和 Expo MCP Server。AI agents and Expo 概览介绍了每个代理的设置方法。
🌐 For Cursor and other agents, install Expo Skills and the Expo MCP Server separately. The AI agents and Expo overview covers setup for each agent.
下一步
🌐 Next step
你有一个项目。现在是时候设置你的开发环境,以便你可以开始开发了。
🌐 You have a project. Now it's time to set up your development environment so that you can start developing.