同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Operating system: 64-bit version of Windows 10.
DevEco Device Tool is a plug-in for Visual Studio Code. The installation procedure includes five parts:
npm install -g @ohos/hpm-cli |
|||
Plug-in for the OpenHarmony source code compilation, programming, and debugging |
https://device.harmonyos.com/en/ide#download Log in with your HUAWEI ID to download it. You can register an account here. |
NOTE: If you have installed Visual Studio Code, open the CLT and run code --version to check whether the version is 1.53 or later. If the version number is returned, it indicates that the environment variables are set correctly.
Double-click the Visual Studio Code package to install it. During the installation, select Add to PATH (requires shell restart).
After the installation is complete, restart the computer for the environment variables of Visual Studio Code to take effect.
Open the CLT and run code --version. If the version number can be displayed, it indicates that the installation is successful.
Double-click the Python software package, select Add Python xx to PATH, and click Install Now.
After the installation is complete, click Close.
Open the CLT, and run python --version to check the installation result.
In the CLT, run the following commands to set the pip source for downloading the dependencies required for later installation:
pip config set global.trusted-host repo.huaweicloud.com
pip config set global.index-url https://repo.huaweicloud.com/repository/pypi/simple
pip config set global.timeout 120
NOTE: If you have installed Node.js, open the CLT and run node -v to check whether the version is 12.0.0 or later.
Run the downloaded software package to install. Use the default settings when following the installation wizard, and click Next until Finish is displayed. During the installation, Node.js will automatically set the system Path environment variable to the installation directory of node.exe.
Open the CLT and run node -v. If the version number of Node.js is displayed, it indicates that Node.js has been successfully installed.
Before installing hpm, ensure that Node.js has been installed
and that your network can access the Internet. If your network requires a proxy to access the Internet, set up the npm proxy first.
NOTE: If hpm has been installed, run npm update -g @ohos/hpm-cli to update it to the latest version.
You are advised to set the npm source to an image in China, for example, a HUAWEI CLOUD image source.
npm config set registry https://repo.huaweicloud.com/repository/npm/
Open the CLT and run the following command to install the latest version of hpm:
npm install -g @ohos/hpm-cli
After the installation is complete, run the following command to obtain the installation result:
hpm -V
To install the DevEco Device Tool plug-in, ensure that the user name of the host cannot contain Chinese characters; otherwise, the plug-in may fail to run.
DevEco Device Tool will automatically download and install the C/C++ and CodeLLDB plug-ins from the Visual Studio Code Marketplace during the installation process. Therefore, make sure Visual Studio Code can access the Internet. If your network requires a proxy to access the Internet, set up the Visual Studio Code proxy first.
NOTE: Before installing DevEco Device Tool, ensure that Visual Studio Code is closed.
Decompress the DevEco Device Tool plug-in package and double-click the installer to install.
During the installation, the dependency files (such as C/C++ and CodeLLDB plug-ins) and execution programs required by DevEco Device Tool are automatically installed.
After the installation is complete, the CLT is automatically closed.
Open Visual Studio Code, click the button on the left, and check whether C/C++, CodeLLDB, and DevEco Device Tool are listed in INSTALLED.
NOTE: If the C/C++ and CodeLLDB plug-ins fail to be installed, DevEco Device Tool cannot run properly. To solve the issue, see Installing the C/C++ and CodeLLDB Plug-ins Offline.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。