提交 f7892261 编写于 作者: W wusongqing

updated docs

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 3cb651ea
......@@ -7,10 +7,15 @@ A widget displays brief information about an application on the UI of another ap
Basic concepts:
- Widget provider
The widget provider is an atomic service that provides the content to be displayed. It controls the display content, component layout, and component click events of a widget.
- Widget host
The widget host is an application that displays the widget content and controls the position where the widget is displayed in the host application.
- Widget Manager
The Widget Manager is a resident agent that manages widgets added to the system and provides functions such as periodic widget update.
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
......
......@@ -8,8 +8,9 @@ On the created page, we use various items to describe food, such as food names,
1. Create a folder named model and create a file named FoodData.ets therein.
![en-us_image_0000001223127760](figures/en-us_image_0000001223127760.png)
![en-us_image_0000001223127760](figures/en-us_image_0000001223127760.png)
2. Define a food data storage model, FoodData, and an enum variable, Category. The FoodData class contains the food ID, name, category, image, calories, protein, fat, carbohydrates, and vitamin C attributes.
The eTS programming language is an extension of the TS language and also supports the TS syntax.
......
......@@ -34,12 +34,14 @@ Perform the following steps to download the code in the repository to your compu
```
2. Clone the remote repository.
- You can copy the address of the remote repository on the repository page.
- You can copy the address of the remote repository on the repository page.
**Figure 1** <a name="fig1772512534014"></a>
**Figure 1** <a name="fig1772512534014"></a>
- Run the following command on the local host:
![](figures/clone.png "clone")
- Run the following command on the local host:
```
git clone $remote_link
```
......
en/contribute/figures/clone.png

14.4 KB | W: | H:

en/contribute/figures/clone.png

14.5 KB | W: | H:

en/contribute/figures/clone.png
en/contribute/figures/clone.png
en/contribute/figures/clone.png
en/contribute/figures/clone.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -7,25 +7,30 @@
### "usr/sbin/ninja: invalid option -- w" Displayed During the Build Process
- **Symptom**
The compilation fails, and **usr/sbin/ninja: invalid option -- w** is displayed.
The compilation fails, and **usr/sbin/ninja: invalid option -- w** is displayed.
- **Possible Causes**
The Ninja version in the compilation environment is outdated and does not support the **--w** option.
The Ninja version in the compilation environment is outdated and does not support the **--w** option.
- **Solution**
Uninstall Ninja and GN in the environment and reinstall them by following instructions in [Obtaining Tools](../get-code/gettools-ide.md).
### "/usr/bin/ld: cannot find -lncurses" Displayed During the Build Process
- **Symptom**
The compilation fails, and **/usr/bin/ld: cannot find -lncurses** is displayed.
The compilation fails, and **/usr/bin/ld: cannot find -lncurses** is displayed.
- **Possible Causes**
The ncurses library is not installed.
The ncurses library is not installed.
- **Solution**
```
Run **sudo apt-get install lib32ncurses5-dev** to install the library.
```
......@@ -34,13 +39,15 @@
### "line 77: mcopy: command not found" Displayed During the Build Process
- **Symptom**
The compilation fails, and **line 77: mcopy: command not found** is displayed.
The compilation fails, and **line 77: mcopy: command not found** is displayed.
- **Possible Causes**
Mcopy is not installed.
Mcopy is not installed.
- **Solution**
```
Run **sudo apt-get install dosfstools mtools** to install mcopy.
```
......@@ -49,37 +56,43 @@
### "riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory" Displayed During the Build Process
- **Symptom**
The compilation fails, and the following information is displayed: **riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory**.
The compilation fails, and the following information is displayed: **riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory**.
- **Possible Causes**
Permission is required to access files in the **riscv** compiler path.
Permission is required to access files in the **riscv** compiler path.
- **Solution**
Run the following command to query the directory where **gcc_riscv32** is located:
Run the following command to query the directory where **gcc_riscv32** is located:
```
which riscv32-unknown-elf-gcc
```
```
Run the **chmod** command to change the directory permission to **755**.
### "No module named 'Crypto'" Displayed During the Build Process
- **Symptom**
The compilation fails, and **No module named'Crypto loaded** is displayed.
The compilation fails, and **No module named'Crypto loaded** is displayed.
- **Possible Causes**
Crypto is not installed in Python3.
Crypto is not installed in Python3.
- **Solution**
1. Run the following command to query the Python version:
```
python3 --version
```
2. Ensure that Python 3.7 or later is installed, and then run the following command to install pycryptodome:
```
sudo pip3 install pycryptodome
```
......@@ -88,13 +101,15 @@
### "xx.sh : xx unexpected operator" Displayed During the Build Process
- **Symptom**
The compilation fails, and **xx.sh [: xx unexpected operator** is displayed.
The compilation fails, and **xx.sh [: xx unexpected operator** is displayed.
- **Possible Causes**
The compilation environment is shell instead of bash.
The compilation environment is shell instead of bash.
- **Solution**
```
sudo rm -rf /bin/sh
sudo ln -s /bin/bash /bin/sh
......@@ -104,52 +119,58 @@
### "Could not find a version that satisfies the requirement six&gt;=1.9.0" Displayed During the Build Process
- **Symptom**
The following error occurs during compilation and building:
The following error occurs during compilation and building:
```
Could not find a version that satisfies the requirement six>=1.9.0
```
```
- **Possible Causes**
**six** is not installed.
**six** is not installed.
- **Solution**
Solution 1: Run the **pip3 install six** command to install **six** online.
Method 2: Offline installation
Download the installation package from [PyPI](https://pypi.org/project/six/#files).
![en-us_image_0000001251276115](figures/en-us_image_0000001251276115.png)
Save the source code to the Linux server and run the **pip3 install six-1.14.0-py2.py3-none-any.whl** command to install **six**.
Solution 1: Run the **pip3 install six** command to install **six** online.
Method 2: Offline installation
Download the installation package from [PyPI](https://pypi.org/project/six/#files).
![en-us_image_0000001251276115](figures/en-us_image_0000001251276115.png)
Save the source code to the Linux server and run the **pip3 install six-1.14.0-py2.py3-none-any.whl** command to install **six**.
After the preceding installation is complete, rebuild an environment.
### "cannot find -lgcc" Displayed During the Build Process
- **Symptom**
The following error occurs during the build process:
The following error occurs during the build process:
```
riscv32-unknown-elf-ld: cannot find -lgcc
```
```
- **Possible Causes**
The PATH is incorrectly written by **gcc_riscv32**. There is an extra slash (/).
The PATH is incorrectly written by **gcc_riscv32**. There is an extra slash (/).
```
~/gcc_riscv32/bin/:/data/toolchain/
```
```
- **Solution**
Modify the PATH by deleting the slash (/).
Modify the PATH by deleting the slash (/).
```
~/gcc_riscv32/bin:/data/toolchain/
```
......@@ -158,42 +179,47 @@
### The Message Indicating Python Cannot Be Found Is Displayed During the Build Process
- **Symptom**
The following error occurs during the build process:
The following error occurs during the build process:
```
-bash: /usr/bin/python: No such file or directory
```
```
- **Possible Cause 1**
Python is not installed.
Python is not installed.
- **Solution**
Run the following command to install Python. The following uses Python 3.8 as an example.
Run the following command to install Python. The following uses Python 3.8 as an example.
```
sudo apt-get install python3.8
```
```
- **Possible Cause 2**
The soft link that points to the Python does not exist in the **usr/bin** directory.
![en-us_image_0000001243200677](figures/en-us_image_0000001243200677.png)
The soft link that points to the Python does not exist in the **usr/bin** directory.
![en-us_image_0000001243200677](figures/en-us_image_0000001243200677.png)
- **Solution**
Run the following commands to add a soft link:
Run the following commands to add a soft link:
```
# cd /usr/bin/
# which python3
# ln -s /usr/local/bin/python3 python
# python --version
```
Example:
```
Example:
![en-us_image_0000001243320787](figures/en-us_image_0000001243320787.png)
......@@ -204,12 +230,14 @@
![en-us_image_0000001251276255](figures/en-us_image_0000001251276255.png)
- **Possible Causes**
Python 3 is not installed.
Python 3 is not installed.
- **Solution**
Run the following command to install Python 3:
Run the following command to install Python 3:
```
sudo apt-get install python3.8
```
......@@ -7,30 +7,32 @@
### "Error: Opening COMxx: Access denied" Displayed When I Start Burning
- **Symptom**
**Error: Opening COMxx: Access denied** is displayed after clicking **Burn** and selecting a serial port.
**Error: Opening COMxx: Access denied** is displayed after clicking **Burn** and selecting a serial port.
**Figure 1** Failed to open the serial port
![en-us_image_0000001243481961](figures/en-us_image_0000001243481961.png)
![en-us_image_0000001243481961](figures/en-us_image_0000001243481961.png)
- **Possible Causes**
The serial port is in use.
The serial port is in use.
- **Solution**
1. Search for the terminal using serial-xx from the drop-down list in the **TERMINAL** panel.
**Figure 2** Checking whether the serial port is in use
![en-us_image_0000001243481989](figures/en-us_image_0000001243481989.png)
2. Click the dustbin icon as shown below to disable the terminal using the serial port.
**Figure 3** Disabling the terminal using the serial port
![en-us_image_0000001243082093](figures/en-us_image_0000001243082093.png)
3. Click **Burn**, select the serial port, and start burning images again.
**Figure 4** Restarting the burning task
![en-us_image_0000001198322224](figures/en-us_image_0000001198322224.png)
......@@ -39,34 +41,42 @@
### The Image Failed To Be Burnt
- **Symptom**
The burning status is not displayed after clicking **Burn** and selecting a serial port.
The burning status is not displayed after clicking **Burn** and selecting a serial port.
- **Possible Causes**
The IDE is not restarted after the DevEco plug-in is installed.
The IDE is not restarted after the DevEco plug-in is installed.
- **Solution**
Restart the IDE.
### No Command Output Is Displayed
- **Symptom**
The serial port shows that the connection has been established. After the board is restarted, nothing is displayed when you press **Enter**.
The serial port shows that the connection has been established. After the board is restarted, nothing is displayed when you press **Enter**.
- **Possible Cause 1**
The serial port is connected incorrectly.
The serial port is connected incorrectly.
- **Solution**
Change the serial port number.
Start **Device Manager** to check whether the serial port connected to the board is the same as that connected to the terminal device. If the serial ports are different, perform step 1 in the **Running an Image** section to change the serial port number.
Change the serial port number.
Start **Device Manager** to check whether the serial port connected to the board is the same as that connected to the terminal device. If the serial ports are different, perform step 1 in the **Running an Image** section to change the serial port number.
- **Possible Cause 2**
The U-Boot of the board is damaged.
The U-Boot of the board is damaged.
- **Solution**
Burn the U-Boot.
Burn the U-Boot.
If the fault persists after you perform the preceding operations, the U-Boot of the board may be damaged. You can burn the U-Boot by performing the following steps:
1. Obtain the U-Boot file.
......@@ -90,41 +100,42 @@
### Windows-based PC Failed to Be Connected to the Board
- **Symptom**
The file image cannot be obtained after clicking **Burn** and selecting a serial port.
The file image cannot be obtained after clicking **Burn** and selecting a serial port.
**Figure 6** Failed to obtain the file image due to network disconnection
![en-us_image_0000001198322428](figures/en-us_image_0000001198322428.png)
![en-us_image_0000001198322428](figures/en-us_image_0000001198322428.png)
- **Possible Causes**
The board is disconnected from the Windows-based PC.
Windows Firewall does not allow Visual Studio Code to access the network.
The board is disconnected from the Windows-based PC.
Windows Firewall does not allow Visual Studio Code to access the network.
- **Solution**
1. Check whether the network cable is properly connected.
1. Check whether the network cable is properly connected.
2. Click **Windows Firewall**.
2. Click **Windows Firewall**.
**Figure 7** Setting the firewall
![en-us_image_0000001198162584](figures/en-us_image_0000001198162584.png)
**Figure 7** Setting the firewall
![en-us_image_0000001198162584](figures/en-us_image_0000001198162584.png)
3. Click **Firewall & network protection**, and on the displayed page, click **Allow an app through the firewall**.
**Figure 8** Firewall & network protection
![en-us_image_0000001198323146](figures/en-us_image_0000001198323146.png)
**Figure 8** Firewall & network protection
![en-us_image_0000001198323146](figures/en-us_image_0000001198323146.png)
4. Select Visual Studio Code.
**Figure 9** Selecting Visual Studio Code
**Figure 9** Selecting Visual Studio Code
![en-us_image_0000001198003232](figures/en-us_image_0000001198003232.png)
![en-us_image_0000001198003232](figures/en-us_image_0000001198003232.png)
5. Select the **Private** and **Public** network access rights for Visual Studio Code.
**Figure 10** Allowing Visual Studio Code to access the network
![en-us_image_0000001243084579](figures/en-us_image_0000001243084579.png)
**Figure 10** Allowing Visual Studio Code to access the network
![en-us_image_0000001243084579](figures/en-us_image_0000001243084579.png)
\ No newline at end of file
......@@ -7,15 +7,18 @@
### What should I do if garbled characters and segmentation faults occur during hb installation?
- **Symptom**
Garbled characters and segmentation faults occur during the execution of the **python3 -m pip install --user ohos-build** command.
Garbled characters and segmentation faults occur during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
pip is of an early version.
pip is of an early version.
- **Solution**
Upgrade pip.
Upgrade pip.
```
python3 -m pip install -U pip
```
......@@ -24,15 +27,18 @@
### What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?
- **Symptom**
The message "cannot import 'sysconfig' from 'distutils'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
The message "cannot import 'sysconfig' from 'distutils'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
The **distutils** module is unavailable.
The **distutils** module is unavailable.
- **Solution**
Install **distutils**.
Install **distutils**.
```
sudo apt-get install python3.8-distutils
```
......@@ -41,15 +47,18 @@
### What should I do if the message "module 'platform' has no attribute 'linux_distribution'" is displayed during hb installation?
- **Symptom**
The message "module 'platform' has no attribute 'linux_distribution'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
The message "module 'platform' has no attribute 'linux_distribution'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
There is a compatibility issue of python3-pip.
There is a compatibility issue of python3-pip.
- **Solution**
Reinstall pip.
Reinstall pip.
```
sudo apt remove python3-pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
......@@ -60,15 +69,18 @@
### What should I do if the message "Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation?
- **Symptom**
The message "Could not find a version that satisfies the requirement ohos-build" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
The message "Could not find a version that satisfies the requirement ohos-build" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
The installation fails due to poor network connectivity.
The installation fails due to poor network connectivity.
- **Solution**
1. Ensure that your computer has a good network connection. If the network connection is unstable, rectify the network fault and reinstall hb.
2. If the network is functional, run the following commands to install hb by specifying a temporary PyPI source:
```
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ohos-build
```
......@@ -77,17 +89,20 @@
### What should I do if the message "configure: error: no acceptable C compiler found in $PATH" is displayed during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
The following error occurs during Python 3 installation:
```
configure: error: no acceptable C compiler found in $PATH. See 'config.log' for more details
```
```
- **Possible Causes**
**gcc** is not installed.
**gcc** is not installed.
- **Solution**
1. Run the **apt-get install gcc** command to install **gcc** online.
2. After the installation, reinstall Python 3.
......@@ -95,17 +110,20 @@
### What should I do if the message "-bash: make: command not found is displayed" during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
The following error occurs during Python 3 installation:
```
-bash: make: command not found
```
```
- **Possible Causes**
**Make** is not installed.
**Make** is not installed.
- **Solution**
1. Run the **apt-get install make** command to install Make online.
2. After the installation, reinstall Python 3.
......@@ -113,92 +131,104 @@
### What should I do if the message **zlib not available** is displayed during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
The following error occurs during Python 3 installation:
```
zipimport.ZipImportError: can't decompress data; zlib not available
```
```
- **Possible Causes**
**zlib** is not installed.
**zlib** is not installed.
- **Solution**
Solution 1: Run the **apt-get install zlib** command to install **zlib** online.
Solution 2: If the software source does not contain **zlib**, download the source code from <xref href="http://www.zlib.net/" scope="external" class="- topic/xref " id="xref17252104445818">http://www.zlib.net/</xref>.
![en-us_image_0000001198001086](figures/en-us_image_0000001198001086.png)
Then run the following commands to install **zlib** offline:
Solution 1: Run the **apt-get install zlib** command to install **zlib** online.
Solution 2: If the software source does not contain **zlib**, download the source code from <xref href="http://www.zlib.net/" scope="external" class="- topic/xref " id="xref17252104445818">http://www.zlib.net/</xref>.
![en-us_image_0000001198001086](figures/en-us_image_0000001198001086.png)
Then run the following commands to install **zlib** offline:
```
# tar xvf zlib-1.2.11.tar.gz
# cd zlib-1.2.11
# ./configure
# make && make install
```
```
After the installation, reinstall Python 3.
### What should I do if the message "No module named 'Crypto'" is displayed during the build process?
- **Symptom**
The following error occurs during compilation and building:
The following error occurs during compilation and building:
```
ModuleNotFoundError: No module named 'Crypto'
```
```
- **Possible Causes**
**Crypto** is not installed.
**Crypto** is not installed.
- **Solution**
Solution 1: Run the **pip3 install Crypto** command to install **Crypto** online.
Method 2: Offline installation
Download the source code from [PyPI](https://pypi.org/project/pycrypto/#files).
![en-us_image_0000001251196005](figures/en-us_image_0000001251196005.png)
Save the source package to the Linux server, decompress the package, and run the **python3 setup.py install** command to install Crypto.
Solution 1: Run the **pip3 install Crypto** command to install **Crypto** online.
Method 2: Offline installation
Download the source code from [PyPI](https://pypi.org/project/pycrypto/#files).
![en-us_image_0000001251196005](figures/en-us_image_0000001251196005.png)
Save the source package to the Linux server, decompress the package, and run the **python3 setup.py install** command to install Crypto.
After the preceding installation is complete, rebuild an environment.
### What should I do when an error with **lsb_release** occurs during **kconfiglib** installation?
- **Symptom**
The following error occurs during **kconfiglib** installation:
The following error occurs during **kconfiglib** installation:
```
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
```
```
- **Possible Causes**
The Python version matched with the **lsb_release** module is different from the current Python version.
The Python version matched with the **lsb_release** module is different from the current Python version.
- **Solution**
Run the **find / -name lsb_release** command, for example, **sudo rm -rf /usr/bin/lsb_release** to locate and delete **lsb_release**.
### What should I do if the message "ImportError: No module named apt_pkg" is displayed during the execution of an unidentifiable command?
- **Symptom**
The message "ImportError: No module named apt_pkg" is displayed when an unidentifiable command is executed on the Linux server.
The message "ImportError: No module named apt_pkg" is displayed when an unidentifiable command is executed on the Linux server.
- **Possible Causes**
There is a compatibility issue of python3-apt.
There is a compatibility issue of python3-apt.
- **Solution**
Reinstall python3-apt.
Reinstall python3-apt.
```
sudo apt-get remove python3-apt
sudo apt-get install python3-apt
......
......@@ -20,7 +20,7 @@ The compiled executable program is run directly without being converted to an ap
Call the **UtilsSetEnv** function of the KV store to set the data storage path.
```
UtilsSetEnv("/storage/com.example.kv");
```
......@@ -38,7 +38,7 @@ There is no such a global variable.
You can obtain DOM elements via the **ref** attribute. You can use methods of the obtained elements but cannot change their attributes. The sample code is as follows:
```
......@@ -77,7 +77,7 @@ You can pass values through **params** of the **router.replace** method. The sam
Set **params** to the values to be passed on a page. The sample code is as follows:
```
router.replace({
uri:'pages/detail/detail', // URI of the page to be redirected to.
......@@ -87,7 +87,7 @@ router.replace({
Receive the passed values on another page.
```
onInit(){
const data = this.transferData; // Use the onInit function to receive the passed data.
......@@ -141,7 +141,7 @@ The object or its attributes are not defined before dynamic binding.
### How do I implement relative and absolute positioning?
You can use the **<div>** and **<stack>** (with **top** and **left** attributes) components to implement relative positioning and absolute positioning.
You can use the **<div\>** and **<stack\>** (with **top** and **left** attributes) components to implement relative positioning and absolute positioning.
### How do I display or hide a component?
......@@ -180,9 +180,11 @@ Do not include too many elements in an array. Avoid frequent operations on a lar
### Why does hdc_std fail to connect to a device?
- **Symptom**
After the **hdc_std list targets** command is executed, **[Empty]** is displayed.
After the **hdc_std list targets** command is executed, **[Empty]** is displayed.
- **Solution**
1. The device cannot be identified.
Check whether **HDC Device** exists under the **Universal Serial Bus controllers** in the **Device Manager**. If **HDC Device** does not exist, the device cannot be connected. In this case, disconnect and then reconnect the USB connection between the test PC and the OpenHarmony device, or burn the latest image.
2. hdc_std works improperly.
......@@ -194,7 +196,9 @@ Do not include too many elements in an array. Avoid frequent operations on a lar
### hdc_std fail to run
- **Symptom**
After you click **hdc_std.exe**, the file fails to execute.
After you click **hdc_std.exe**, the file fails to execute.
- **Solution**
**hdc_std.exe** requires no installation. You can use it after placing it to a local directory or adding the tool path to environment variables. Run the **cmd** command and then run the **hdc_std** command to start the tool.
......@@ -4,15 +4,18 @@
## What should I do if garbled characters and segmentation faults occur during hb installation?
- **Symptom**
Garbled characters and segmentation faults occur during the execution of the **python3 -m pip install --user ohos-build** command.
Garbled characters and segmentation faults occur during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
pip is of an early version.
pip is of an early version.
- **Solution**
Upgrade pip.
Upgrade pip.
```
python3 -m pip install -U pip
```
......@@ -21,15 +24,18 @@
## What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?
- **Symptom**
The message "cannot import 'sysconfig' from 'distutils'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
The message "cannot import 'sysconfig' from 'distutils'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
The **distutils** module is unavailable.
The **distutils** module is unavailable.
- **Solution**
Install distutils.
Install distutils.
```
sudo apt-get install python3.8-distutils
```
......@@ -38,15 +44,18 @@
## What should I do if the message "module 'platform' has no attribute 'linux_distribution'" is displayed during hb installation?
- **Symptom**
The message "module 'platform' has no attribute 'linux_distribution'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
The message "module 'platform' has no attribute 'linux_distribution'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
There is a compatibility issue of python3-pip.
There is a compatibility issue of python3-pip.
- **Solution**
Reinstall pip.
Reinstall pip.
```
sudo apt remove python3-pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
......@@ -57,15 +66,18 @@
## What should I do if the message "Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation?
- **Symptom**
The message "Could not find a version that satisfies the requirement ohos-build" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
The message "Could not find a version that satisfies the requirement ohos-build" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
The installation fails due to poor network connectivity.
The installation fails due to poor network connectivity.
- **Solution**
1. Ensure that your computer has a good network connection. If the network connection is unstable, rectify the network fault and reinstall hb.
2. If the network is functional, run the following commands to install hb by specifying a temporary PyPI source:
```
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ohos-build
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册