Mobile Development 5 min read

Step-by-Step Guide to Building a Hello World Application on Huawei HarmonyOS 2.0

This tutorial walks readers through downloading the HarmonyOS 2.0 IDE, configuring the SDK, creating various types of HarmonyOS applications (TV, Wearable, Lite Wearable), installing the emulator, authorizing a Huawei account, and finally running a Hello World app on the emulator.

Sohu Tech Products
Sohu Tech Products
Sohu Tech Products
Step-by-Step Guide to Building a Hello World Application on Huawei HarmonyOS 2.0

Huawei HarmonyOS 2.0 has been officially open‑sourced, and this guide shows how Android developers can quickly get started with a simple "Hello World" project using the HarmonyOS IDE.

1. Prerequisites

1.1 Official website

Visit https://www.harmonyos.com for the official HarmonyOS portal.

1.2 IDE download

Download the source‑code IDE from https://device.harmonyos.com/cn/ide and the development studio from https://developer.harmonyos.com/cn/develop/deveco-studio#download .

1.3 Source code location

The open‑source code can be obtained at https://device.harmonyos.com/cn/docs/start/get-code/oem_sourcecode_guide-0000001050769927 .

2. Developing an Application

2.1 SDK setup

During installation the IDE may prompt to download the SDK; cancel the prompt, manually search for the SDK, and set a custom SDK path. All required SDK components can be selected for automatic download.

2.2 Creating a project

The "Create Project" wizard now supports four template types:

2.2.1 TV device application

2.2.2 Wearable device application

2.2.3 Lite Wearable (Lite) application

2.2.4 TV project (Java) using a list template

During project creation Gradle 5.4.1 is downloaded (default location shown in the screenshots). The download can be slow, but once completed the Gradle source is correctly switched to the Huawei domestic repository.

2.3 Downloading the emulator

Confirm the download dialog to start downloading the emulator; if the download fails, click "download again" to retry.

2.4 Logging in with a Huawei account

Use the Windows built‑in browser (not Chrome) to avoid authorization issues. After real‑name verification (e.g., bank‑card verification), authorize the developer account.

Authorization succeeds and the agreement is accepted.

2.5 Running the TV emulator

The list of available emulators is displayed; select the TV emulator and start it.

After the emulator launches, the Hello World application runs successfully.

Final screenshot shows the running application.

— End —

mobile developmentHarmonyOSTutorialIDEemulatorHello World
Sohu Tech Products
Written by

Sohu Tech Products

A knowledge-sharing platform for Sohu's technology products. As a leading Chinese internet brand with media, video, search, and gaming services and over 700 million users, Sohu continuously drives tech innovation and practice. We’ll share practical insights and tech news here.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.