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.

系统要求

🌐 System requirements

从默认项目开始

🌐 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:

Terminal
- npx create-expo-app@latest
- yarn create expo-app
- pnpm create expo-app
- bun create expo

从一个例子开始

🌐 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:

Terminal
- npx create-expo-app@latest --example
- yarn create expo-app --example
- pnpm create expo-app --example
- bun create expo --example

要直接创建一个已知示例,请传入其名称:

🌐 To create a known example directly, pass its name:

Terminal
- npx create-expo-app@latest --example with-widgets
- yarn create expo-app --example with-widgets
- pnpm create expo-app --example with-widgets
- bun create expo --example with-widgets

设置一个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:

Terminal
- claude plugin install expo@claude-plugins-official

然后在你的 Claude Code 会话中运行 /mcp 来登录你的 Expo 账号。

🌐 Then run /mcp inside your Claude Code session to 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:

expo-project-structure

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.