目录

What should I do if the MacOS cannot identify hdc commands?

  1. Solution for problems related to environment variables:
    1. Click the apple icon on the top left of the screen and choose System Settings > Users & Groups.
    2. Hold down the Ctrl key, click the user account name in the left pane, and select Advanced Options.
    3. Select /bin/bash from the Login Shell drop-down list to set bash as the default shell.

  2. Solution for problems not related to environment variables:
    1. Open the terminal and input cd ~.
    2. Run the sudo vim.bash_profile command to edit the file.
    3. Input the following at the bottom of the file:

      export PATH=${PATH}:Sdk/default/base/toolchains

      Press Esc to exit, and input :wq to save the settings and exit.

    4. Run the source.bash_profile command to load environment variables.
    5. Run hdc -v. If the version information is displayed, the hdc command can be used.

    Reference

    FAQs