This article will cover the following seven areas

1. Download and install the development tool. 2. Log in to the developer account for real-name authentication. 4. Install the development language (Java is installed by default, and Node.js is manually installed if you want to develop JS) 5. Install the SDK that is not installed by default (currently SDK includes JS, Java, and Native) 6. 7. Start the simulator for my other articles, you can click on my profile picture to view the original text. You can search for the author: Chatterzhao, which is the source of this article, and you can also search for the account: chatterzhao.

Some links in the article can not be directly opened, we can right-click open.

First, preparation

The development environment

Note: • Currently only Windows version, macOS version is in preparation, until September 10, 2020.IDE version: • Download requires an account number. If it is a Huawei phone, open the Settings of the phone and scan the code in the account to log in. If you have not registered your developer account, Please register and authenticate with your real name (you need an account to download the IDE, and you must log in with your real name to start the simulator during development, and the registration entry will pop up). More installation related tutorial please see: developer.harmonyos.com/cn/docs/doc…

1. Install the IDE

The name DevEco in IDE seems to read: wear microclasp, for reference only

Device development IDE: HUAWEI DevEco Device Tool

Download address: device.harmonyos.com/cn/ide#down… HarmonyOS is a one-stop integrated development environment for smart devices (hardware). HarmonyOS provides on-demand component customization, one-click compilation and burning, visual debugging, and distributed capabilities integration to help developers efficiently develop and innovate new hardware

Application development IDE: HUAWEI DevEco Studio

Download link: developer.harmonyos.com/cn/develop/… HUAWEI DevEco Studio (DevEco Studio for short) is a one-stop integrated development environment (IDE) for HUAWEI terminals in all scenarios and multiple devices based on the open source version of IntelliJ IDEA Community. HarmonyOS provides E2E application development services for developers to create, develop, compile, debug, and publish project templates. By using DevEco Studio, developers will be able to develop HarmonyOS ‘distributed capabilities more efficiently, increasing innovation efficiency.

2. Install the language based on the development language

Application development of Hongmeng platform currently supports the development language: JS, JAVA, C/C++, JAVA language has been installed with IDE by default, if you want to use JS language for development, you need to manually install Node.js, otherwise not necessary.

Node.js official website: nodejs.org/zh-cn/, it is recommended to grow… JS development? You like I may have a big question mark, here a link to reassure a little bit about the first: www.yuque.com/chatterzhao…

Application development IDE installation looks like this:

3. The SDK installation

Need to use what language to develop the corresponding SDK installation if you want to use JS development, in order to download the JS SDK faster and can be executed on the command line: NPM config set registry mirrors.huaweicloud.com/repository/…

4. Log in to the developer account

• Preview menu: View -> Tool Windows -> Previewer Run -> Debug ‘entry’, entry 2: View -> Tool Windows -> Simulator Tools ->HVD Manager click the HVD Manager in the screenshot below. If there is no Login, the default browser will be used to open the Login url or click DevEco Login to start the Login, as shown in the picture below

5. Set the IDE skin

Here set to dark mode: file->Settings… ->Appearance & Behavior->Appearance->Theme->HuaWei Dark Theme

6. Set the font for the IDE

Font of IDE software, the font size below is personal preference

Here enable the font Constantia with the font size 14: file->Settings… ->Appearance & Behavior->Appearance-> Check Use custom font-> Font setting: Constantia, font size: 14

7. Set the font for the IDE editor

Code font, the following font size is personal preference

Enable Consolas font 16: file->Settings… ->Editor->Font->Font-> Font-> Set Font: Consolas, Font size: 16 (for English fonts) Fallback Font (Monospaced)

8. The IDE localization

Many people say that with the IDE born in Hongmeng why a development tool is in English, the heart is old upset, I think early can understand, itself Huawei is now in a hurry, we developers write code in English, the world is the same, using English can be common. In the future, each country can handle it according to its own language. Even if there is no such relationship, it can be understood in English.

Note that it was developed based on IntellJ, and it is possible to Chinese DevEco Studio by Chinese IntellJ

Localization reference links: developer.huawei.com/consumer/cn…

Ii. Official documents

IDE installation/environment configuration/entry/API-UI corresponding to each development language, etc., official documents are available

HongMeng website: www.harmonyos.com/cn/home/

Everything started in the place, baidu still can not search the official website, so we remember: Hongmeng OS.com, the domain name is English: Harmonyos.com pronunciation: Harmony English [ˈhɑːməni] beauty [ˈhɑːrməni] n. Harmony; Harmony; Harmony; Harmony; coordinate

Development documentation: developer.harmonyos.com/cn/document…

Development environment more installation and configuration related tutorial please see: developer.harmonyos.com/cn/docs/doc… Note: currently support JS, JAVA, C/C++ development languages for development. JS development? You like I may have a big question mark, here a link to reassure a little bit about the first: www.yuque.com/chatterzhao… Know more, please go to here: developer.harmonyos.com/cn/docs/doc…

1.Java API, Native API, JS API document address

Developer.harmonyos.com/cn/docs/doc…

2.Java UI and JS UI document addresses

Developer.harmonyos.com/cn/docs/doc…

Three, community

, 51 cto:harmonyos.51cto.com/, electronic enthusiasts (hardware) : bbs.elecfans.com/harmonyos, huawei developer alliance: developer.huawei.com/consumer/cn…

Create a project

Now you can create TV and wearable apps, so I’m going to create an empty project for TV, which is the first option, and I’m going to choose JS.

Create HarmonyOS Project 1:

Create HarmonyOS Project 2:

Create HarmonyOS Project 3:

Create HarmonyOS Project 4:

Five, debugging,

• Preview menu: View -> Tool Windows -> Previewer (enter the specific page to edit the code, then click the menu to display Previewer)

• Simulator menu: entry 1: Run -> Debug ‘entry’, e.g. entry 2: View -> Tool Windows -> Simulator

• Remote virtual device menu: Tools ->HVD Manager (you need to log in to a real-name account, note the duration limit)

Start remote device for simulation test

To start the remote device, you need to log in to the developer account with real name first. (If you do not log in, the login page will be automatically opened in the default browser. If you log in with an account without real name, the login fails.)

The first boot up will require some downloading, which will be slow

As of September 10, 2010, only TVS and wearables were available

TV mode, remote virtual device window is not displayed enough, you can click Settings to modify the display (click the red circle)


BBS HarmonyOS official developers: developer.huawei.com/consumer/cn…

The original link: developer.huawei.com/consumer/cn…

Original author: ChatterZhao