// 设置 - 应用和元服务内修改软件icon和名称等相关信息
// 位置: 设置 - 应用和元服务
// AppScore/app.json5
// 这里不是在桌面看, 是在设置 - 应用和元服务内看的
// 模拟器内: 版本号改了之后要卸载后重新安装才能看
{
"app": {
"bundleName": "com.example.myapplication", // 包名 不可省略
"vendor": "example", // 应用开发厂商描述 不可省略
"versionCode": 1000000, // 版本号, 数值越大版本越高
"versionName": "1.0.0", // 给用户看的版本号
"icon": "$media:app_icon", // 应用图标
"label": "$string:app_name" // 应用名, 进入到"$string:app_name"内去修改name
}
}
// 手机桌面修改软件icon和名称等相关信息
// entry/src/main/module.json5
{
"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", // 配的图标, 位置: entry/src/main/resources/base/media
"label": "$string:EntryAbility_label", // 配的名称, 位置: entry/src/main/resources/base/element/string.json内的label, 有个注意点, 鸿蒙是支持中英文的, 所以不要直接改名称, 进入到string.json内, 点击右上角Open editor, 在对应的zh_cn内修改即可
"startWindowIcon": "$media:startIcon",
"startWindowBackground": "$color:start_window_background",
"exported": true,
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
]
}
],
"extensionAbilities": [
{
"name": "EntryBackupAbility",
"srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets",
"type": "backup",
"exported": false,
"metadata": [
{
"name": "ohos.extension.backup",
"resource": "$profile:backup_config"
}
],
}
]
}
}