HarmonyOS NEXT-HarmonyOS three-layer architecture building, embedded in HMRouter, to achieve convenient jumping, novice strategy. (1/3)

Next, I will lead you to improve it by building a three-layer architecture of HarmonyOS and implementing the embedding of HMRouter. After completion, you can jump to the page at will and write your own chapter in the three-tier structure.
Step 0: Associate the project with the AGC Huawei console
First of all, AGC, AppGallery Connect creates your own project
edit
Follow the steps to enter your name and click Done to enter the project settings page
edit
Click Add app
edit
If you work in the company, according to the convention, the package name is written backwards with the domain name, if not, you can play casually.
edit
Find your package name, copy it, and use it later.
Next, launch DevEco Studio
edit
Create a new project as follows, and click Next
edit
Place the copied package name in the following location to link the application with AGC control to facilitate subsequent permission applications. Click Finish
edit
The first step is to create a common capability layer
Right-click on the root directory, click New, click on the directory, and enter commons (Create Common Capability Layer)
edit
Right-click on commons, click New, Module, create HSP, and click Next
edit
edit
Module name: Change to basic and click Finish
edit
The second step is to create a base property layer
Right-click on the root directory, click New, click on the directory, and enter Features (to create a base property layer)
edit
Right-click on features, click New, Module, create HSP, and click Next
edit
According to your tabBar, there are several, just create a few hsp packages in the base feature layer, as shown in the example below, create a my's hsp package
edit
The second step is to create a product customization layer
Right-click on the root directory, click New, click on Catalog, and enter products (to create a product customization layer)
edit
The last step is to add the entry in bold in the root directory as follows
edit
Drag the entry to the Products and Product Customization layers, and click Restructure
edit
After placing that entry, rename the module
edit
Renamed to phone
edit
Once completed, the shelves of our three-tier structure are complete. 1/3 complete
Subscribe to my newsletter
Read articles from xiao directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
