鸿蒙应用开发项目中module.json5配置文件中对应属性的概述

鸿蒙应用开发module.json配置文件说明文档官方网址链接

 

{
  "module": {
    "requestPermissions": [
      {
        "name": "ohos.permission.INTERNET"    //申请网络权限
      }
    ],
    "name": "entry",  //当前模块的名称
    "type": "entry",  //当前模块的类型(1.ability能力模块;2.library共享依赖模块)
    "description": "$string:module_desc",     //当前模块的描述(来自:entry>src>main>resources>base>string.json文件)
    "mainElement": "EntryAbility",      //当前模块的入口
    "deviceTypes": [    //设备类型
      "phone",    //手机
      "tablet"    //平板
    ],
    "deliveryWithInstall": true,
    "installationFree": false,
    "pages": "$profile:main_pages",   //页面指定位置(entry>src>main>resources>profile>main_pages.json)
    "abilities": [    //ability属性(ability模块)
      {
        "name": "EntryAbility",   //名字
        "srcEntry": "./ets/entryability/EntryAbility.ts",     //源码位置(src>main>ets>entryability>EntryAbility.ts)
        "description": "$string:EntryAbility_desc",     //对ability描述
        "icon": "$media:icon",     //当前ability的一个图标(桌面展示的图标)entry>src>main>resources>base>media>icon.png
        "label": "$string:EntryAbility_label",          //当前ability的一个文字描述(桌面应用展示的文字,即应用名称)entry>src>main>resources>base>element>string>里面的value
        "startWindowIcon": "$media:icon",
        "startWindowBackground": "$color:start_window_background",    //启动时刻展示的一个图标和背景色
        "exported": true,
        "skills": [
          {
            "entities": [
              "entity.system.home"
            ],
            "actions": [
              "action.system.home"
            ]
          }
        ]
      }
    ]
  }
}

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值