How to Build Your First HarmonyOS App: A Step‑by‑Step Guide
This article walks you through setting up the HarmonyOS 2.0 development environment, downloading the IDE and source code, creating TV, Wearable and Lite Wearable projects, configuring the SDK, installing the emulator, authorizing your Huawei account, and finally running a hello‑world app on the emulator.
1. Prerequisites
HarmonyOS 2.0 has been officially open‑sourced. The author followed the steps to set up the development environment, which feels very similar to Android Studio for Android developers.
1.1 Official website
https://www.harmonyos.com
1.2 IDE download
https://device.harmonyos.com/cn/ide
1.3 Development tool download
https://developer.harmonyos.com/cn/develop/deveco-studio#download
1.4 OpenHarmony source code
https://openharmony.gitee.com
1.5 Source code location
https://device.harmonyos.com/cn/docs/start/get-code/oem_sourcecode_guide-0000001050769927
2. Developing the Application
2.1 SDK setup
When the installer prompts to download the SDK, click Cancel, then search for the SDK manually and set a custom SDK path.
2.2 Creating a project
Click "Create Project" – three project types are available: TV device app, Wearable app, and Lite Wearable app.
2.2.1 TV device app
2.2.2 Wearable app
2.2.3 Lite Wearable app
2.3 Creating a TV project (Java)
Select a list template and start the creation process.
During project creation Gradle 5.4.1 is downloaded, which may be slow.
2.4 Downloading the emulator
Confirm the download dialog; the download can be slow and may need to be retried.
2.5 Logging in with a Huawei account
Use the Windows built‑in browser for login; Chrome may cause authorization failures.
Complete real‑name verification (bank card verification is fast).
2.6 Authorization
After successful authorization, agree to the agreement.
2.7 Available simulators
Start the TV simulator, run the app, and you will see the "Hello World" output.
2.8 Result
The application runs successfully on the emulator.
3. Summary
The initial experience with HarmonyOS shows that the development tools and workflow are quite close to Android Studio, with only minor API differences. Feel free to try it out.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Programmer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
