HarmonyOS - Building a Harmony development environment on macOS


Install DevEco

Software download address:
https://developer.harmonyos.com/cn/develop/deveco-studio


Today I downloaded DevEco Studio 3.1.1 Release - Mac version

Insert image description here


After decompression, it is a dmg file (it does not need to be compressed like this).
Just drag the app into the application. It takes about 1 minute to copy a file of more than 2 G.
Insert image description here


After copying is complete, unmount dmg
Insert image description here


2. Startup and settings

In the application, open the app and start a series of settings
Insert image description here


I don’t have any previous settings, so I choose Do not…

Insert image description here


Then you will enter the startup interface

Insert image description here


Setups

Here I choose Install to avoid version problems
Insert image description here


Insert image description here


The Accept button is below the comparison. If the window is relatively small, you need to drag the interface; you can also enlarge the window.
Insert image description here


Click Next to enter the installation

Insert image description here


After the installation is successful, click Finish to enter the main project interface.

Insert image description here


First App

1. Basic project information settings

Double-click Create Projectto enter the selection template, here I select the first Template;
when the mouse is hovering, the device icon appears, and I select the first device;
Insert image description here


Enter the project configuration interface.
You can observe that different versions of SDK can be used for compilation.
I modified the project name to SDemo.

Insert image description here


Click Finish to enter the project editing interface
. The control terminal below will display the Process progress.

Insert image description here


Here change the message content to my text


2. Install equipment

When selecting a device, Your Devicesa window will pop up
. Select Phone. The Install button will be displayed here. Click it to enter the installation of SDK Components.
Insert image description here


The simulator has not been installed yet. You need to create a new simulator installation path.

Click the Edit button below, and you will be prompted to select a folder. Here I create a new folder to select.
Then click on the lower right + New Emulator, a window for selecting hardware will pop up, click Next.

Insert image description here


Enter the window to select the system image, click the download button next to Name, and enter the download.
After the download is completed, click Finish in the lower right corner.
Insert image description here


After the device installation is completed, enter this interface.
I feel that the naming is not very reasonable, so I will not modify it yet. I believe there are areas that can be modified.
Insert image description here


The device information is displayed here
, but in the engineering interface, you cannot select this device yet;
you need to click the green button in this interface to start the device.
Insert image description here


Click the green run button on the right side of the device list, and the simulator will start.

Insert image description here


The first time you start it, it will take some time and the screen will be black for a while.

Insert image description here


3. Run the project

At this point, you can set the device to be the Phone you just used.
Insert image description here


Click the run button on the right side of the device and run the project on the simulator
to see the effect.

Insert image description here


Happy winter solstice! Let’s spend the longest night of the year together:)
Iori 2023-12-23

Guess you like

Origin blog.csdn.net/lovechris00/article/details/135163461