# hmtest-chapter01-2 **Repository Path**: wayxingwork/hmtest-chapter01-2 ## Basic Information - **Project Name**: hmtest-chapter01-2 - **Description**: 第一章例子2,熟悉ArkTS编写环境 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: t1 - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-22 - **Last Updated**: 2025-08-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 第一章例子程序 ## 介绍 熟悉使用DevEco新建的Empty Application项目 ## 效果预览 ![1-1.PNG](./doc/image/1-1.PNG) ![1-2.PNG](./doc/image/1-2.PNG) 运行单元测试 ![1-3.PNG](./doc/image/1-3.PNG) ## 项目结构 生成模板,需要修改的文件 ```` MyApplication/ ├── entry/ # 主模块目录 │ ├── src/ │ │ ├── main/ # 主代码目录 │ │ │ ├── ets/ │ │ │ │ ├── pages/ │ │ │ │ │ └── Index.ets # 主页面 │ │ │ │ └── service/ │ │ │ │ └── calculator.ets # 计算服务工具函数 │ │ └── test/ # 单元测试代码 │ │ ├── List.test.ets │ │ └── LocalUnit.test.ets # 本地单元测试 ```` ### 主要文件 1. **EntryAbility.ets** - 应用的主入口点,负责应用生命周期管理 2. **Index.ets** - 应用的主页面 3. **calculator.ets** - 提供基本数学运算函数的服务模块 ## 约束与限制 使用DevEco 5.1预览器和单元测试工具运行