We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如图所示:
Stage 模型应用配置文件主要有两类:
AppScope
app.json5
module.json5
示例:
{ "app": { "bundleName": "com.tyhoo.ohos.myapplication", "vendor": "example", "versionCode": 1000000, "versionName": "1.0.0", "icon": "$media:app_icon", "label": "$string:app_name" } }
bundleName
versionCode、versionName
icon
/AppScope/resources/base/media
label
/AppScope/resources/base/element
{ "module": { "requestPermissions": [ { "name": "ohos.permission.INTERNET" } ], "name": "entry", "type": "entry", "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ "phone", "tablet" ], "deliveryWithInstall": true, "installationFree": false, "pages": "$profile:main_pages", "abilities": [ { "name": "EntryAbility", "srcEntry": "./ets/entryability/EntryAbility.ts", "description": "$string:EntryAbility_desc", "icon": "$media:icon", "label": "$string:EntryAbility_label", "startWindowIcon": "$media:icon", "startWindowBackground": "$color:start_window_background", "exported": true, "skills": [ { "entities": [ "entity.system.home" ], "actions": [ "action.system.home" ] } ] } ] } }
requestPermissions
name、type
description
/当前模块/src/main/resources/base/element
mainElement
EntryAbility(入口 Ability)
/当前模块/src/main/ets/entryability
deviceTypes
deliveryWithInstall
pages
/当前模块/src/main/resources/base/profile
abilities
注:更详细的配置信息可以到 官方文档 - 应用配置文件概述(Stage模型)查看。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
如图所示:
Stage 模型应用配置文件主要有两类:
AppScope
目录下,app.json5
。用来配置应用全局的信息。module.json5
。用来配置模块的信息。一、全局配置文件
示例:
bundleName
versionCode、versionName
icon
/AppScope/resources/base/media
目录下的图片。label
/AppScope/resources/base/element
目录下的 string.json。二、模块配置文件
示例:
requestPermissions
name、type
description
/当前模块/src/main/resources/base/element
目录下的 string.json。mainElement
EntryAbility(入口 Ability)
,存放在/当前模块/src/main/ets/entryability
目录下的 EntryAbility.ts。deviceTypes
deliveryWithInstall
pages
/当前模块/src/main/resources/base/profile
目录下的 main_pages.json。abilities
The text was updated successfully, but these errors were encountered: