As a basic functional unit of apps/atomic services, a module contains source code, resource files, third-party libraries, and configuration files. You can create one or more modules in a project. Four types of modules are supported: entry, feature (supported only in app projects), har, and shared. For details, see module.json5 Configuration File.
Since DevEco Studio 6.0.1 Beta1, you can specify the C++ language standard when creating a native C++ module or library template.
Creating a Module
- Perform any of the following:
- Method 1: Right-click the top of the project directory and choose New > Module from the shortcut menu. The new module will be created in the root directory of the project.
- Method 2: Select any file in the project directory and choose File > New > Module on the menu bar. The new module will be created in the root directory of the project.
- Method 3: Create a directory in the root directory of the project. Right-click the directory and choose New > Module from the shortcut menu. The new module will be created in that directory.
NOTE
Method 3 is not applicable to the following directories: AppScope, hvigor, oh_modules, build, and directories starting with a period (such as .hvigor and .idea).
- On the New Project Module page, select a template and click Next.

- Configure the module settings and click Next.
- Module name: name of the new module. It must be different from the project name or the name of another module in the project.
- Module type: module type, which can be feature or entry. This field is only available in an ability template.
NOTE
- Only one entry module can be added for a project. Yet, you can change the module type of an existing module to entry through the type field in the module.json5 file.
- If a type of device already has an entry module, you must configure distribution rules for a new entry module.
- Device type: device type of the module. If Module type is set to feature, you can only select the device type specified for the project. If Module type is entry, you can select any supported device types.
- Enable native: whether to enable native code. This field is only available in a library template. With native code enabled, you can create a shared module for invoking C++ code.
- C++ Standard: C++ standard library, which can be Toolchain Default, C++11, or C++14. This field is supported since DevEco Studio 6.0.1 Beta1.

- If the module is using an ability template, also set Ability name and Exported (or Visible in the FA model).
- When Exported (or Visible) is selected, the ability can be called by other apps/atomic services.
- When Exported (or Visible) is not selected, other apps/atomic services cannot call the ability.
- Click Finish. After the module is created, you can view and edit the new module in the project directory. You can configure settings for modules in the project through the modules field in the build-profile.json5 file.
Deleting a Module
Right-click the module to delete in the project directory, and choose Delete from the shortcut menu. When prompted, click Delete.