Repository helps manage HMS Core open capabilities. You can download required resources and upgrade XMS code with just one click.
Downloading Resources
You can download required resources based on the open capabilities that you want to use. HMS Toolkit automatically writes the dependency information of the capabilities to the build.gradle file of the corresponding modules.
- Go to HMS > Repository or click the icon shown in the following figure.

- Set Module to the module name of the project you created. Select the kit to be used and click Apply to download the kit resources. Then, you can call related APIs.

The following table lists the resource status of each kit.
Icon | Description |
 | The kit is not in use. To use the kit, select it and click b>Apply. |
 | The kit is in use. |
 | The kit has been downloaded and a new version is available. You can select the kit, and the status will change to . Click b>Apply to update the kit to the latest version. |
 | The kit can be removed. In this status, you can click Apply to remove the kit. |
 | The kit on which the current kit depends is missing. You can select the kit, and the status will change to . After you click b>Apply, the associated kit will be automatically downloaded. |
 | The kit on which the current kit depends is missing. After you click b>Apply, the associated kit will be automatically downloaded. |
- Call the APIs by referring to the development guides and API references of HMS Core.
Upgrading XMS Adapter Code in One-Click Mode
You can upgrade the XMS Adapter code in one-click mode.
- Go to HMS > Repository or click the icon shown in the following figure.

- Set Module to xmsadapter. The following table describes the HMS and GMS update status and the functions of the buttons on the page.
HMS/GMS Update | Buttons |
Whether HMS Needs to Be Updated | Whether GMS Needs to Be Updated | Update All | Apply | OK |
No | No | Not displayed | Dimmed | Closes the current page. |
No | Yes | Not displayed | Updates the GMS to the selected version. | Closes the current page after the GMS is updated to the selected version. |
Yes | No | Updates the HMS to the latest version. | Dimmed | Closes the current page after the HMS is updated to the latest version. |
Yes | Yes | Updates the HMS to the latest version, and the GMS to the selected version. | Updates the HMS to the latest version, and the GMS to the selected version. | Closes the current page after the HMS is updated to the latest version, and the GMS to the selected version. |
说明
- If the HMS Core kit version is not the latest official version or the GMS kit version is not supported by the tool, a message (UNAVAILABLE) will be displayed.
- If the dependency of the GMS kit exists but the dependency of the HMS Core kit does not exist, the message "missing" is displayed. (This message is also displayed if the dependency of the HMS Core kit exists but the dependency of the GMS kit does not exist.)
- HMS Core Framework has implicit dependencies. When HMS Core and GMS Framework kits exist and the HMS Core Framework is not explicitly declared, the latest version number of the HMS Core Framework is displayed by default.
- There is no HMS Core kit matching FirebaseCore Kit, and the version number is set to --- by default.
