提交 2702d233 编写于 作者: E ester.zhou
上级 3138e0f8
......@@ -5,7 +5,7 @@
>
> To use ArkTS, your DevEco Studio must be V3.0.0.900 Beta3 or later.
>
> In this document, DevEco Studio 4.0 Beta1 is used. You can download it [here](../../release-notes/OpenHarmony-v4.0-beta1.md#version-mapping).
> In this document, DevEco Studio 4.0 Beta2 is used. You can download it [here](../../release-notes/OpenHarmony-v4.0-beta2.md#version-mapping).
## Creating an ArkTS Project
......@@ -21,7 +21,9 @@ The following describes how to create the OpenHarmony projects of API 10 and API
![createProject](figures/createProject.png)
3. On the project configuration page, set **Compile SDK** to **3.1.0(API 9** and retain the default values for other parameters.
3. On the project configuration page, set **Compile SDK** to **3.1.0(API 9)** and retain the default values for other parameters.
The **Node** parameter sets the Node.js version to use for the project. You can use an existing version or download a new one.
![chooseStageModel](figures/chooseStageModel.png)
......@@ -43,12 +45,13 @@ The following describes how to create the OpenHarmony projects of API 10 and API
![targetSdkVersion](figures/targetSdkVersion.png)
7. Delete the **runtimeOS** configuration from the **targets** field in all module-level **build-profile.json5** files.
7. Delete the **runtimeOS** configuration from the **targets** field in the module-level **build-profile.json5** files.
![deleteRuntimeOS](figures/deleteRuntimeOS.png)
8. Click **Sync Now** and wait until the synchronization is complete. A project of API version 10 is now created.
### Creating a Project of API Version 9
1. If you are opening DevEco Studio for the first time, click **Create Project**. If a project is already open, choose **File** > **New** > **Create Project** from the menu bar.
......@@ -57,7 +60,9 @@ The following describes how to create the OpenHarmony projects of API 10 and API
![createProject](figures/createProject.png)
3. On the project configuration page, set **Compile SDK** to **3.1.0(API 9** and retain the default values for other parameters.
3. On the project configuration page, set **Compile SDK** to **3.1.0(API 9)** and retain the default values for other parameters.
The **Node** parameter sets the Node.js version to use for the project. You can use an existing version or download a new one.
![chooseStageModel](figures/chooseStageModel.png)
......@@ -78,11 +83,11 @@ The following describes how to create the OpenHarmony projects of API 10 and API
## ArkTS Project Directory Structure (Stage Model, API Version 10)
![en-us_image_0000001364054489](figures/en-us_image_0000001364054489.png)
![project](figures/project.png)
- **AppScope > app.json5**: application-level configuration information.
- **entry**: OpenHarmony project module, which can be built into an OpenHarmony Ability Package ([HAP](../../glossary.md#hap)).
- **entry**: OpenHarmony project module, which can be built into an ability package (HAP).
- **src > main > ets**: a collection of ArkTS source code.
- **src > main > ets > entryability**: entry to your application/service.
......@@ -99,17 +104,18 @@ The following describes how to create the OpenHarmony projects of API 10 and API
- **oh_modules**: third-party library dependency information. For details about how to adapt a historical npm project to ohpm, see [Manually Migrating Historical Projects](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/project_overview-0000001053822398-V3#section108143331212).
- **build-profile.json5**: application-level configuration options, including **signingConfigs** and **products**. The **runtimeOS** field in **products** indicates the runtime OS. Its default value is **HarmonyOS**. If you are developing an OpenHarmony application, change the value to **OpenHarmony**.
- **build-profile.json5**: application-level configuration information, including the **signingConfigs** and **products** configuration. The **runtimeOS** field in **products** indicates the runtime OS. Its default value is **HarmonyOS**. If you are developing an OpenHarmony application, change the value to **OpenHarmony**.
- **hvigorfile.ts**: application-level build script.
## ArkTS Project Directory Structure (Stage Model, API Version 9)
![en-us_image_0000001364054489](figures/en-us_image_0000001364054489.png)
![project](figures/project.png)
- **AppScope > app.json5**: application-level configuration information.
- **entry**: OpenHarmony project module, which can be built into an OpenHarmony Ability Package ([HAP](../../glossary.md#hap)).
- **entry**: OpenHarmony project module, which can be built into an ability package (HAP).
- **src > main > ets**: a collection of ArkTS source code.
- **src > main > ets > entryability**: entry to your application/service.
......@@ -267,7 +273,7 @@ You can implement page redirection through the [page router](../reference/apis/j
1. Implement redirection from the first page to the second page.
In the **index.ets** file of the first page, bind the **onClick** event to the **Next** button so that clicking the button redirects the user to the second page. The sample code in the **Index.ets** file is shown below:
In the **Index.ets** file of the first page, bind the **onClick** event to the **Next** button so that clicking the button redirects the user to the second page. The sample code in the **Index.ets** file is shown below:
```ts
// Index.ets
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册