鸿蒙工程目录介绍

鸿蒙构建完毕生成hhvp文件。

项目结构:

.hvigor : 是存储构建配置文件的

.idea : 是开发工具拥有的目录

AppScope : 是全局的公共资源存放位置

hvigor :存放前端构建配置信息

oh_modules : 存放项目用到的第三方包

build-profile.json5 : 应用级别的构建配置信息

hvigorfile.ts : 执行编译构建任务的一个脚本

oh-package.json5 : 依赖的配置

oh-package-lock.json5 : 生成的一个树形的依赖树

模块结构:

ohosTest : 单元测试

build-profile.json5 : 模块级别的构建配置信息

hvigorfile.ts : 模块级别的执行编译构建任务的一个脚本

module.json5 : 当前模块的配置信息

module.json5:

json 复制代码
{
  "module": {
    "name": "entry",   // 模块名字
    "type": "entry",   // 
    "description": "$string:module_desc",
    "mainElement": "EntryAbility",  // 当前模块入口
    "deviceTypes": [
      "phone",
      "tablet",
      "2in1"
    ],
    "deliveryWithInstall": true,
    "installationFree": false,
    "pages": "$profile:main_pages",
    "abilities": [
      {
        "name": "EntryAbility",
        "srcEntry": "./ets/entryability/EntryAbility.ets",
        "description": "$string:EntryAbility_desc",
        "icon": "$media:layered_image",
        "label": "$string:EntryAbility_label",
        "startWindowIcon": "$media:startIcon",
        "startWindowBackground": "$color:start_window_background",
        "exported": true,
        "skills": [
          {
            "entities": [
              "entity.system.home"
            ],
            "actions": [
              "action.system.home"
            ]
          }
        ]
      }
    ]
  }
}

一个模块对应一个打包后的hap包, hap包的全称是HarmonyOS Ability Package, 其中包含了Ability,第三方库,资源和配置文件。

相关推荐
训山2 小时前
【11】纯血鸿蒙HarmonyOS NEXT星河版开发0基础学习笔记-模块化语法与自定义组件
笔记·学习·华为·harmonyos·鸿蒙系统
helloxmg3 小时前
鸿蒙harmonyos next flutter混合开发之开发package
flutter·华为·harmonyos
zhongcx19 小时前
鸿蒙应用示例:ArkTS UI框架中的文本缩进技巧
harmonyos
东林知识库21 小时前
鸿蒙NEXT开发-自定义构建函数(基于最新api12稳定版)
华为·harmonyos
裴云飞1 天前
鸿蒙性能优化之布局优化
性能优化·harmonyos
zhongcx1 天前
鸿蒙应用示例:ArkTS中设置颜色透明度与颜色渐变方案探讨
harmonyos
真正的醒悟1 天前
华为资源分享
运维·服务器·华为
PlumCarefree2 天前
mp4(H.265编码)转为本地RTSP流
音视频·harmonyos·h.265
鸿蒙自习室2 天前
鸿蒙网络管理模块04——网络连接管理
华为·harmonyos·鸿蒙·媒体
小Q的编程笔记2 天前
HarmonyOS:AVPlayer 与 XComponent 联手打造定制化视频播放器
harmonyos