Hongmeng Development Study Notes 1 - Running hello world on a real machine

problem background

The first step in learning any language and framework is always to run through the familiar "hello world". This article will introduce how Hongmeng Development can run through "hello world".

problem analysis

1. Instructions for building the first ArkTS application (fa model)
: Please use DevEco Studio V3.0.0.601 Beta1 and later. Download link: https://developer.harmonyos.com/cn/develop/deveco-studio.
(1) Create ArkTS project
If you open DevEco Studio for the first time, please click Create Project to create the project. If a project is already open, please select File > New > Create Project from the menu bar to create a new project.
(2) Select Application development (this article takes application development as an example, Atomic Service corresponds to meta-service development), select the template "Empty Ability", and click Next to proceed to the next step of configuration.
insert image description here

(3) Enter the configuration project interface, select "3.0.0(API 8)" for Compile SDK, select "FA" for Model, and keep the default settings for other parameters.
insert image description here

(4) Click Finish, the tool will automatically generate sample code and related resources, and wait for the project to be created.
(5) After the project is created, an error is reported when running the project: Failure[INSTALL_FAILED_NO_BUNDLE_SIGNATURE]
insert image description here

Cause Analysis: This error means that the app needs to be signed before running on the real device .
Go to the File > Project Structure > Project > Signing Configs interface, click the "Sign In" button to log in, and return to the client to run again after successful login.
(6) After the operation is successful, the application can be installed and opened on the mobile phone normally, and hello world is displayed.
insert image description here

conclusion of issue

This article initially introduces how Hongmeng Development runs through the "hello world" program.
Due to the problem of the mobile phone system, this article is based on the fa model. If the updated system can consider the stage model, if the selected project sdk version does not match the mobile phone system version, an error may be reported: "compileSdkVersion and releaseType of the app do not match the apiVersion and releaseType on the device." At this time, the developer needs to match the version.

Guess you like

Origin blog.csdn.net/weixin_39033300/article/details/132233087