app.json5配置文件
{
"app": {
// 应用标识,必须
"bundleName": "com.application.myapplication",
// 可选,对应开发厂商的描述
"vendor": "example",
// 版本号
"versionCode": 1000000,
// 版本号的文字描述
"versionName": "1.0.0",
// 应用图标 - 系统设置中
"icon": "$media:app_icon",
// 应用名称 - 系统设置中
"label": "$string:app_name",
// 可选,应用描述信息
"description": "$string:description_application",
// 最低支持的api版本,由build-profile.json5中的compatibleSdkVersion生成。
"minAPIVersion": 9,
// 应用运行需要的api目标版本,由build-profile.json5中的compileSdkVersion生成。
"targetAPIVersion": 9,
// 可选,运行需要的api目标版本的类型,由ide生成并覆盖
"apiReleaseType": "Release",
// 可选,应用是否可调试
"debug": false,
// 可选是否支持多个工程的联合开发
multiProjects: "false",
// 可选,对car设备做的特殊配置,此外还有 phone wearable tv tablet
"car": {
"minAPIVersion": 8,
},
// 可选,应用的Bundle类型,用于区分应用("app")或者原子化服务("atomicService")
"bundleType": "app"
},
}
module.json5配置文件
{
"module": {
"name": "entry",
"type": "entry",
"description": "$string:module_desc",
"mainElement": "EntryAbility",
"deviceTypes": [
"tv",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:main_pages",
"virtualMachine": "ark",
"pages": "",
"metadata": [
{
"name": "string",
"value": "string",
"resource": "$profile:distributionFilter_config"
}
],
"process": ""
"abilities": [
{
"name": "EntryAbility",
"srcEntry": "./ets/entryability/EntryAbility.ts",
"launchType": ""
"description": "$string:EntryAbility_desc",
"icon": "$media:icon",
"label": "$string:EntryAbility_label",
"startWindowIcon": "$media:icon",
"permissions": [],
"metadata": []
"startWindowBackground": "$color:start_window_background",
"exported": true,
"continuable": false,
"backgroundModes": [],
"removeMissionAfterTerminate": false,
"orientation": "",
"supportWindowMode": [],
"maxWindowRatio": 0,
"minWindowRatio": 0,
"maxWindowWidth": 0,
"minWindowWidth": 0,
"maxWindowHeight": 0,
"minWindowHeight": 0,
"skills": [
{
"entities": [
"entity.systemmaxWindowRatio
// minWindowRatio
// maxWindowWidth
// minWindowWidth
maxWindowHeight.home"
],
"actions": [
"ohos.want.action.home"
]
}
]
}
],
"extensionAbilities": []
"testRunner": {},
"requestPermissions": [
{
"name": "ohos.abilitydemo.permission.PROVIDER",
"reason": "$string:reason",
"usedScene": {
"abilities": [
"FormAbility"
],
"when": "inuse"
}
}
]
}
}