配置文件
{
"module": {
"requestPermissions": [ //权限
{
"name": "ohos.permission.EXECUTE_INSIGHT_INTENT"
}
],
"name": "entry", //模块的名称
"type": "entry", //模块类型 :ability类型和(shared)library类型 ,ability类型又分为entry类型和 feature 功能类型的
"description": "$string:module_desc",
"mainElement": "EntryAbility", //应用组件的一个入口,就是entryability下的EntryAbility.ets文件
"deviceTypes": [ //指定模块的运行设备,这里是手机和平板
"phone",
"tablet"
],
"deliveryWithInstall": true, //是否必须得安装,比如有些feature类型可以不用安装
"installationFree": false,
"pages": "$profile:main_pages", //当前模块下所有的页面路由
"abilities": [ //一个模块下可以创建多个abiliy,都得配置
{
"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": [ //ability的能力
{
"entities": [
"entity.system.home" //标明入口组件
],
"actions": [
"action.system.home"
]
}
]
}
]
}
}