This is the 28th day of my participation in the November Gwen Challenge. Check out the event details: The last Gwen Challenge 2021

HarmonyOS has been updated to version 2.0 in December 2020; People around Xiao CAI are studying and researching, xiao CAI also wants to learn; The first step is to introduce the basic installation and configuration of the basic Mac environment.

HarmonyOS is defined as a future-oriented distributed operating system for all scenarios (mobile office, sports and health, social communications, media and entertainment). Building on the traditional single-device system capabilities, HarmonyOS proposes a distributed concept based on the capabilities of the same system that supports multiple terminals.

For us, HarmonyOS is more open and supports BOTH JS and Java. Xiao CAI now from 0 to learn, the first step is the installation of the environment configuration; HarmonyOS ‘website provides a comprehensive overview of HarmonyOS. As an Android application, HarmonyOS is primarily developed in Java, so you can skip some unnecessary steps.

Mac Environment Requirements

Currently, the Mac environment configuration in the market basically meets the requirements of Huawei DevEco Studio.

  • Operating system: Mac 10.13/10.14/10.15
  • Memory: 8GB or above
  • Hard disk: 100GB or higher
  • Resolution: 1280*800 pixels and above

1. Download and install tools

1.1 the Node. Js

HarmonyOS supports JS development. If you need JS development, you need to download Node.js. In order to use Node.js to run background programs, also download and install; Friends who don’t need it can just skip it;

You are advised to download the LTS-64-bit version from node. js official website. Once the installation is complete, do a simple verification by looking at the Node.js and NPM versions;

node -v
npm -v
Copy the code

1.2 DevEco Studio

DevEco Studio relies on JDK 1.8 and installs JDK automatically during installation. To download DevEco Studio, you need to register with huawei developer account before downloading and installing DevEco Studio.

2. Environment Configuration (omitted)

For the configuration of the environment, including NPM agent, Gradle, etc., you can also download HarmonyOS SDK in advance, which does not require JS development. In particular, the final SDK can be done by DevEco Studio.

3. Hello HarmonyOS !

Then there’s the running experience; DevEco Studio is basically the same as other ides and is very cheap to learn;

  1. Create a new Project, Create HarmonyOS Project

2. You can chooseJS 或 JavaDevelopment, small dishes to tryJavaWay;

  1. Select the project path and configure some basic information;

4. Download the corresponding file for the first timeGradle 和 SDKInformation, just wait, no need for scientific Internet, directly download updates; 5. Open theDevEco StudioFind everything is still very familiar, such as: we can inPreferences -> Editor -> FontIn the viewSDKPath,Preferences -> Editor -> FontSet in theIDEFont themes, etc.;

  1. There is no real device for the small dish. When running for the first time, you need to download the simulator and configure it for the first time in Tools -> HVD Manager. In this case, the browser will be opened, and the huawei Developer Alliance account is required for login authorization.

  1. After the authorization is successful, select the required device from the device list, and try mobile devices first.

  1. After opening the emulator again through Tools -> HVD Manager, you can test the installation. Each emulator can be used for one hour.

  1. HarmonyOS is probably a little cheaper to learn for Android development, for example by changing some of the styles in the XML to align with Android’s thinking;

[image upload failed…(image-5e9a9E-1611390548944)]

  1. The config.json file is the same as the Androidmanifest.xml file of Android. I will try the details later.


When Xiao CAI first came into contact with HarmonyOS, she started learning from 0 and still has a lot to learn from HarmonyOS. If there are mistakes, please guide!

Source: Little Monk A Ce