目录

(Recommended) Automatic Preparations Using HMS Toolkit

As a lightweight IDE tool plugin, HMS Toolkit implements app creation, coding, conversion, debugging, test, and release. It helps you integrate HMS Core APIs with lower costs and higher efficiency.

Configuration Wizard of HMS Toolkit enables you to automatically complete necessary configuration for development preparations.

Configuration Wizard

Installing HMS Toolkit

Windows: Start Android Studio, go to File > Settings > Plugins > Marketplace, enter HMS Toolkit in the search box, and click Install. After the installation is complete, restart Android Studio.

macOS: Start Android Studio, go to Preferences > Plugins > Marketplace, enter HMS Toolkit in the search box, and click Install. After the installation is complete, restart Android Studio.

If the installation way mentioned above does not work, manually download the HMS Toolkit plugin and install it.

Configuring the Development Environment

[h2]Configuring App Information in AppGallery Connect

To develop an app, create it in AppGallery Connect and set required information.

  1. Use your HUAWEI ID to sign in to AppGallery Connect. If you do not have any HUAWEI ID, register one by referring to Registration and Verification.
  2. Create a project and create an app. Note that set Package type to APK (Android app).

    You only need to perform the two steps in AppGallery Connect. Then open HMS Toolkit, which will automatically complete all the other tasks for you. See Configuring the HMS Toolkit Environment.

[h2]Configuring the HMS Toolkit Environment

Before calling the Account Kit capabilities, perform the following steps to configure the environment:

  1. In Android Studio, go to HMS > Configuration Wizard.

    If you have not signed in to AppGallery Connect, Toolkit automatically opens the browser and prompts you to sign in and perform authorization.

  2. After sign-in authorization, select the team name, project module, integrated kit (Account Kit), and certificate type, click Generate to generate an SHA-256 certificate fingerprint, and click Next.

    After you select the team name and project module, HMS Toolkit automatically checks whether the corresponding app is available in AppGallery Connect. If the error messages in red in the following figure are displayed, click Link to check whether the app has been created in AppGallery Connect.

    • If not, create the app and click Retry.
    • If so, verify that the team name and project module are correct and click Retry.

    Two certificate type options:

    • Use your certificate: Use the certificate that you created to generate an SHA-256 certificate fingerprint. This method is used in app release scenarios.
    • Use Android debug certificate: Select the debugging certificate provided by Android to generate an SHA-256 certificate fingerprint. This method is used only in app debugging scenarios. After selecting this mode, you can select an existing certificate file or create a certificate. To learn more about the certificate, please refer to Sign your app.

    Click Generate to generate a certificate fingerprint. If the generation fails, check whether the certificate information matches the fingerprint. Alternatively, manually generate a fingerprint by referring to Generating a Signing Certificate Fingerprint and enter it in the text box.

    HMS Toolkit automatically checks the integration environment of Account Kit, including the general environment and the environment dedicated for the kit.

    HMS Toolkit checks whether each configuration item is correct. If all the items are passed, click Go to coding assistant to call APIs. For details, please refer to en-us_topic_0000001050061057.html.