Configuring the OpenHarmony SDK

To set up the OpenHarmony app development environment, configure the corresponding SDK information in DevEco Studio first.

NOTE: The OpenHarmony SDK is of the API Version 6 Canary1, with some toolchains removed, which is not applicable to HarmonyOS app development.

Prerequisites

Configuring the SDK Information

DevEco Studio manages SDKs and toolchains using SDK Manager. OpenHarmony contains the following SDK packages:

Type

Package Name

Description

SDK

Java

SDK for Java.

JS

SDK for JS.

SDK Tool

Toolchains

Includes compiling, packaging, signing, database management, and other tools that are required to develop OpenHarmony apps.

Previewer

OpenHarmony app previewer, which can be used to view the UI layout during app development.

  1. Open DevEco Studio. If this is the first time you are using it, select Do not import settings and click OK.

  2. Follow the instructions in DevEco Studio to go to the SDK download page. In the HarmonyOS SDK Location field, select the local directory where the SDK package was decompressed, then click Next.

    NOTE: If you are not using DevEco Studio for the first time, the SDK download page may not be displayed. In this case, go to Configure (or ) > Settings > Appearance & Behavior > System Settings > HarmonyOS SDK and click HarmonyOS SDK Location to download the SDK.

  3. After the SDK is installed, click Finish. The DevEco Studio welcome page will then be displayed.

  4. Go to the Sdk\js\version number\build-tools\ace-loader directory, run the following commands in CLI, and wait until the installation is complete.

    npm cache clean -f
    npm install