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
As usual, here the [MainApplication.kt Community template file as reference](https://github.com/react-native-community/template/blob/0.77-stable/template/android/app/src/main/java/com/helloworld/MainApplication.kt)
Finally, we need to create a new `Activity` that will extend `ReactActivity`and host the React Native code. This activity will be responsible for starting the React Native runtime and rendering the React component.
@@ -426,9 +426,9 @@ class MyReactActivity : ReactActivity() {
426
426
</TabItem>
427
427
</Tabs>
428
428
429
-
As usual, here the [MainActivity.kt Community template file as reference](https://github.com/react-native-community/template/blob/0.77-stable/template/android/app/src/main/java/com/helloworld/MainApplication.kt)
Whenever you create a new Activity, you need to add it to your `AndroidManifest.xml`file. You also need set the theme of `MyReactActivity`to`Theme.AppCompat.Light.NoActionBar` (or to any non-ActionBar theme) as otherwise your application will render an ActionBar on top of your React Native screen:
@@ -447,22 +447,22 @@ Whenever you create a new Activity, you need to add it to your `AndroidManifest.
447
447
</manifest>
448
448
```
449
449
450
-
Now your activity is ready to run some JavaScript code.
450
+
现在你的 Activity 已准备好运行 JavaScript 代码了。
451
451
452
-
## 6. Test your integration
452
+
## 6. 测试集成效果
453
453
454
-
You have completed all the basic steps to integrate React Native with your application. Now we will start the [Metro bundler](https://metrobundler.dev/)to build your TypeScript application code into a bundle. Metro's HTTP server shares the bundle from `localhost`on your developer environment to a simulator or device. This allows for [hot reloading](https://reactnative.dev/blog/2016/03/24/introducing-hot-reloading).
You can checkout the [metro.config.js file](https://github.com/react-native-community/template/blob/0.77-stable/template/metro.config.js) from the Community template file as reference.
If you're not using Android Studio, you can create a release build with:
496
+
如果你不使用 Android Studio,可以通过以下命令创建发布版本:
497
497
498
498
```
499
499
cd android
@@ -503,6 +503,6 @@ cd android
503
503
./gradlew :app:bundleRelease
504
504
```
505
505
506
-
### Now what?
506
+
### 接下来?
507
507
508
-
At this point you can continue developing your app as usual. Refer to our [debugging](debugging) and [deployment](running-on-device) docs to learn more about working with React Native.
As usual, here the [MainApplication.kt Community template file as reference](https://github.com/react-native-community/template/blob/0.77-stable/template/android/app/src/main/java/com/helloworld/MainApplication.kt)
Finally, we need to create a new `Activity` that will extend `ReactActivity`and host the React Native code. This activity will be responsible for starting the React Native runtime and rendering the React component.
@@ -426,9 +426,9 @@ class MyReactActivity : ReactActivity() {
426
426
</TabItem>
427
427
</Tabs>
428
428
429
-
As usual, here the [MainActivity.kt Community template file as reference](https://github.com/react-native-community/template/blob/0.77-stable/template/android/app/src/main/java/com/helloworld/MainApplication.kt)
Whenever you create a new Activity, you need to add it to your `AndroidManifest.xml`file. You also need set the theme of `MyReactActivity`to`Theme.AppCompat.Light.NoActionBar` (or to any non-ActionBar theme) as otherwise your application will render an ActionBar on top of your React Native screen:
@@ -447,22 +447,22 @@ Whenever you create a new Activity, you need to add it to your `AndroidManifest.
447
447
</manifest>
448
448
```
449
449
450
-
Now your activity is ready to run some JavaScript code.
450
+
现在你的 Activity 已准备好运行 JavaScript 代码了。
451
451
452
-
## 6. Test your integration
452
+
## 6. 测试集成效果
453
453
454
-
You have completed all the basic steps to integrate React Native with your application. Now we will start the [Metro bundler](https://metrobundler.dev/)to build your TypeScript application code into a bundle. Metro's HTTP server shares the bundle from `localhost`on your developer environment to a simulator or device. This allows for [hot reloading](https://reactnative.dev/blog/2016/03/24/introducing-hot-reloading).
You can checkout the [metro.config.js file](https://github.com/react-native-community/template/blob/0.77-stable/template/metro.config.js) from the Community template file as reference.
If you're not using Android Studio, you can create a release build with:
496
+
如果你不使用 Android Studio,可以通过以下命令创建发布版本:
497
497
498
498
```
499
499
cd android
@@ -503,6 +503,6 @@ cd android
503
503
./gradlew :app:bundleRelease
504
504
```
505
505
506
-
### Now what?
506
+
### 接下来?
507
507
508
-
At this point you can continue developing your app as usual. Refer to our [debugging](debugging) and [deployment](running-on-device) docs to learn more about working with React Native.
0 commit comments