目录

What is the relationship between HAP, HAR, and HSP? Can I declare abilities and pages in them? What are the recommended use scenarios for each of them?

Harmony Ability Package (HAP): basic unit for installing and running applications. It supports declarations of the abilities tag, extensionAbilities tag, and pages in the configuration file.

Use scenarios:

Harmony Archive (HAR): static shared package. For compile-time reuse, it does not support declarations of the abilities tag, extensionAbilities tag, or pages in the configuration file. It provides navigation through the use of the Navigation component.

Use scenarios:

Harmony Shared Package (HSP): dynamic shared package. For runtime reuse, it supports declarations of pages in the configuration file, but not declarations of the abilities tag or extensionAbilities tag.

Use scenarios:

Reference

Application Package Structure in Stage Model