You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
10
8
11
-
import GuideLinuxAndroid from './\_getting-started-linux-android.md';
12
-
import GuideMacOSAndroid from './\_getting-started-macos-android.md';
13
-
import GuideWindowsAndroid from './\_getting-started-windows-android.md';
14
-
import GuideMacOSIOS from './\_getting-started-macos-ios.md';
9
+
import GuideLinuxAndroid from './\_getting-started-linux-android.md'; import GuideMacOSAndroid from './\_getting-started-macos-android.md'; import GuideWindowsAndroid from './\_getting-started-windows-android.md'; import GuideMacOSIOS from './\_getting-started-macos-ios.md';
15
10
16
-
本指南将帮助你搭建开发环境,以便使用 Android Studio 和 Xcode 运行你的项目。这样你就可以使用 Android 模拟器和 iOS 模拟器进行开发、在本地构建应用等。
@@ -95,14 +82,109 @@ import GuideMacOSIOS from './\_getting-started-macos-ios.md';
95
82
96
83
[//]: #'Linux, iOS'
97
84
98
-
## 不支持
85
+
## 暂不支持
86
+
87
+
> 苹果公司目前只允许在 Mac 电脑上开发 iOS 应用。如果你没有 Mac 电脑,那么只能考虑使用`沙盒环境`,或者先开发 Android 应用了。
88
+
89
+
</TabItem>
90
+
</Tabs>
91
+
92
+
</TabItem>
93
+
</Tabs>
94
+
95
+
</TabItem>
96
+
<TabItemvalue="quickstart">
97
+
98
+
> 译注:沙盒环境大量依赖于国外网络环境,也不能直接安装第三方原生组件。不建议国内用户使用
99
+
100
+
Assuming that you have [Node 12 LTS](https://nodejs.org/en/download/) or greater installed, you can use npm to install the Expo CLI command line utility:
Install the [Expo](https://expo.io) client app on your iOS or Android phone and connect to the same wireless network as your computer. On Android, use the Expo app to scan the QR code from your terminal to open your project. On iOS, use the built-in QR code scanner of the Camera app.
149
+
150
+
<h3>Modifying your app</h3>
151
+
152
+
Now that you have successfully run the app, let's modify it. Open `App.js` in your text editor of choice and edit some lines. The application should reload automatically once you save your changes.
153
+
154
+
<h3>That's it!</h3>
155
+
156
+
Congratulations! You've successfully run and modified your first React Native app.
Expo also has [docs](https://docs.expo.io) you can reference if you have questions specific to the tool. You can also ask for help at [Expo forums](https://forums.expo.io).
163
+
164
+
These tools help you get started quickly, but before committing to building your app with Expo CLI, [read about the limitations](https://docs.expo.io/versions/latest/introduction/why-not-expo/).
165
+
166
+
If you have a problem with Expo, before creating a new issue, please see if there's an existing issue about it:
167
+
168
+
- in the [Expo CLI issues](https://github.com/expo/expo-cli/issues) (for issues related to Expo CLI), or
169
+
- in the [Expo issues](https://github.com/expo/expo/issues) (for issues about the Expo client or SDK).
170
+
171
+
If you're curious to learn more about React Native, check out the [Introduction to React Native](getting-started).
172
+
173
+
<h3>Running your app on a simulator or virtual device</h3>
174
+
175
+
Expo CLI allows you to run your React Native app on a physical device without setting up a development environment. If you want to run your app on the iOS Simulator or an Android Virtual Device, please refer to the instructions for "React Native CLI Quickstart" to learn how to install Xcode or set up your Android development environment.
176
+
177
+
Once you've set these up, you can launch your app on an Android Virtual Device by running `npm run android`, or on the iOS Simulator by running `npm run ios` (macOS only).
178
+
179
+
<h3>Caveats</h3>
180
+
181
+
Because you don't build any native code when using Expo to create a project, it's not possible to include custom native modules beyond the React Native APIs and components that are available in the Expo client app.
182
+
183
+
If you know that you'll eventually need to include your own native code, Expo is still a good way to get started. In that case you'll need to "[eject](https://docs.expo.io/versions/latest/workflow/customizing/)" eventually to create your own native builds. If you do eject, the "React Native CLI Quickstart" instructions will be required to continue working on your project.
184
+
185
+
Expo CLI configures your project to use the most recent React Native version that is supported by the Expo client app. The Expo client app usually gains support for a given React Native version about a week after the React Native version is released as stable. You can check [this document](https://docs.expo.io/versions/latest/sdk/overview/#sdk-version) to find out what versions are supported.
186
+
187
+
If you're integrating React Native into an existing project, you'll want to skip Expo CLI and go directly to setting up the native build environment. Select "React Native CLI Quickstart" above for instructions on configuring a native build environment for React Native.
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
10
8
11
-
import GuideLinuxAndroid from './\_getting-started-linux-android.md';
12
-
import GuideMacOSAndroid from './\_getting-started-macos-android.md';
13
-
import GuideWindowsAndroid from './\_getting-started-windows-android.md';
14
-
import GuideMacOSIOS from './\_getting-started-macos-ios.md';
9
+
import GuideLinuxAndroid from './\_getting-started-linux-android.md'; import GuideMacOSAndroid from './\_getting-started-macos-android.md'; import GuideWindowsAndroid from './\_getting-started-windows-android.md'; import GuideMacOSIOS from './\_getting-started-macos-ios.md';
15
10
16
-
In this guide, you'll learn how to set up your environment, so that you can run your project with Android Studio and Xcode. This will allow you to develop with Android emulators and iOS simulators, build your app locally, and more.
This guide requires Android Studio or Xcode. If you already have one of these programs installed, you should be able to get up and running within a few minutes. If they are not installed, you should expect to spend about an hour installing and configuring them.
<summary>Is setting up my environment required?</summary>
16
+
> 译注:沙盒环境大量依赖于国外网络环境,也不能直接安装第三方原生组件。不建议国内用户使用
23
17
24
-
Setting up your environment is not required if you're using a [Framework](/architecture/glossary#react-native-framework). With a React Native Framework, you don't need to setup Android Studio or XCode as a Framework will take care of building the native app for you.
18
+
Assuming that you have [Node 12 LTS](https://nodejs.org/en/download/) or greater installed, you can use npm to install the Expo CLI command line utility:
25
19
26
-
If you have constraints that prevent you from using a Framework, or you'd like to write your own Framework, then setting up your local environment is a requirement. After your environment is set up, learn how to [get started without a framework](getting-started-without-a-framework).
Install the [Expo](https://expo.io) client app on your iOS or Android phone and connect to the same wireless network as your computer. On Android, use the Expo app to scan the QR code from your terminal to open your project. On iOS, use the built-in QR code scanner of the Camera app.
67
+
68
+
<h3>Modifying your app</h3>
69
+
70
+
Now that you have successfully run the app, let's modify it. Open `App.js` in your text editor of choice and edit some lines. The application should reload automatically once you save your changes.
71
+
72
+
<h3>That's it!</h3>
73
+
74
+
Congratulations! You've successfully run and modified your first React Native app.
Expo also has [docs](https://docs.expo.io) you can reference if you have questions specific to the tool. You can also ask for help at [Expo forums](https://forums.expo.io).
81
+
82
+
These tools help you get started quickly, but before committing to building your app with Expo CLI, [read about the limitations](https://docs.expo.io/versions/latest/introduction/why-not-expo/).
83
+
84
+
If you have a problem with Expo, before creating a new issue, please see if there's an existing issue about it:
85
+
86
+
- in the [Expo CLI issues](https://github.com/expo/expo-cli/issues) (for issues related to Expo CLI), or
87
+
- in the [Expo issues](https://github.com/expo/expo/issues) (for issues about the Expo client or SDK).
88
+
89
+
If you're curious to learn more about React Native, check out the [Introduction to React Native](getting-started).
90
+
91
+
<h3>Running your app on a simulator or virtual device</h3>
92
+
93
+
Expo CLI allows you to run your React Native app on a physical device without setting up a development environment. If you want to run your app on the iOS Simulator or an Android Virtual Device, please refer to the instructions for "React Native CLI Quickstart" to learn how to install Xcode or set up your Android development environment.
94
+
95
+
Once you've set these up, you can launch your app on an Android Virtual Device by running `npm run android`, or on the iOS Simulator by running `npm run ios` (macOS only).
96
+
97
+
<h3>Caveats</h3>
98
+
99
+
Because you don't build any native code when using Expo to create a project, it's not possible to include custom native modules beyond the React Native APIs and components that are available in the Expo client app.
100
+
101
+
If you know that you'll eventually need to include your own native code, Expo is still a good way to get started. In that case you'll need to "[eject](https://docs.expo.io/versions/latest/workflow/customizing/)" eventually to create your own native builds. If you do eject, the "React Native CLI Quickstart" instructions will be required to continue working on your project.
102
+
103
+
Expo CLI configures your project to use the most recent React Native version that is supported by the Expo client app. The Expo client app usually gains support for a given React Native version about a week after the React Native version is released as stable. You can check [this document](https://docs.expo.io/versions/latest/sdk/overview/#sdk-version) to find out what versions are supported.
104
+
105
+
If you're integrating React Native into an existing project, you'll want to skip Expo CLI and go directly to setting up the native build environment. Select "React Native CLI Quickstart" above for instructions on configuring a native build environment for React Native.
@@ -69,19 +152,19 @@ If you have constraints that prevent you from using a Framework, or you'd like t
69
152
70
153
[//]: #'Windows, iOS'
71
154
72
-
## Unsupported
155
+
## 暂不支持
73
156
74
-
> A Mac is required to build projects with native code for iOS. You can use [Expo Go](https://expo.dev/go) from [Expo](https://expo.dev) to develop your app on your iOS device.
157
+
> 苹果公司目前只允许在 Mac 电脑上开发 iOS 应用。如果你没有 Mac 电脑,那么只能考虑使用`沙盒环境`,或者先开发 Android 应用了。
@@ -93,9 +176,12 @@ If you have constraints that prevent you from using a Framework, or you'd like t
93
176
94
177
[//]: #'Linux, iOS'
95
178
96
-
## Unsupported
179
+
## 暂不支持
180
+
181
+
> 苹果公司目前只允许在 Mac 电脑上开发 iOS 应用。如果你没有 Mac 电脑,那么只能考虑使用`沙盒环境`,或者先开发 Android 应用了。
97
182
98
-
> A Mac is required to build projects with native code for iOS. You can use [Expo Go](https://expo.dev/go) from [Expo](https://expo.dev) to develop your app on your iOS device.
0 commit comments