鸿蒙工程目录介绍

鸿蒙构建完毕生成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,第三方库,资源和配置文件。

相关推荐
威哥爱编程3 小时前
鸿蒙开发:那些让我熬秃头的“灵异事件”
harmonyos·arkts·arkui
威哥爱编程3 小时前
2026年的IT圈,看看谁在“裸泳”,谁在“吃肉”
后端·ai编程·harmonyos
奔跑的露西ly4 小时前
【HarmonyOS NEXT】进程与线程的理解
华为·harmonyos
REDcker7 小时前
Android WebView 升级 - WebViewUpgrade 库使用详解
android·华为·harmonyos·webview
行者967 小时前
Flutter跨平台开发:颜色选择器适配OpenHarmony
flutter·harmonyos·鸿蒙
funnycoffee1237 小时前
华为路由器或3层设备接口下的arp broadcast enable作用是啥?
网络·华为
baobao熊9 小时前
【Harmony OS 6】IBest-ORM库使用详解(一)
华为·harmonyos
行者969 小时前
Flutter鸿蒙跨平台开发:实现高性能可拖拽排序列表组件
flutter·harmonyos·鸿蒙
baobao熊9 小时前
【Harmony OS 6】地图操作系列-路程规划
华为·harmonyos
行者969 小时前
Flutter FloatingActionButton在OpenHarmony平台的深度适配与优化实践
flutter·harmonyos·鸿蒙