### "usr/sbin/ninja: invalid option -- w" Displayed During the Build Process
### "usr/sbin/ninja: invalid option -- w"
-**Symptom**
The compilation fails, and **usr/sbin/ninja: invalid option -- w** is displayed.
The build 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 use 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).
Uninstall Ninja and GN, and [install Ninja and GN of the required version](../get-code/gettools-ide.md).
### "/usr/bin/ld: cannot find -lncurses" Displayed During the Build Process
### "/usr/bin/ld: cannot find -lncurses"
-**Symptom**
The compilation fails, and **/usr/bin/ld: cannot find -lncurses** is displayed.
The build fails, and **/usr/bin/ld: cannot find -lncurses** is displayed.
-**Possible Causes**
The ncurses library is not installed.
-**Solution**
...
...
@@ -39,17 +36,15 @@
```
### "line 77: mcopy: command not found" Displayed During the Build Process
### "line 77: mcopy: command not found"
-**Symptom**
The compilation fails, and **line 77: mcopy: command not found** is displayed.
The build fails, and **line 77: mcopy: command not found** is displayed.
-**Possible Causes**
Mcopy is not installed.
mcopy is not installed.
-**Solution**
...
...
@@ -58,65 +53,62 @@
```
### "riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory" Displayed During the Build Process
### "riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory"
-**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 build fails, and the following information is displayed: <br>**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.
You do not have the required permission to access files in the RISC-V compiler directory.
-**Solution**
1. Run the following command to query the directory where **gcc_riscv32** is located:
```
which riscv32-unknown-elf-gcc
```
1. Run the following command to locate **gcc_riscv32**:
```
which riscv32-unknown-elf-gcc
```
2. Run the **chmod** command to change the directory permission to **755**.
### "No module named 'Crypto'" Displayed During the Build Process
### "No module named 'Crypto'"
-**Symptom**
The compilation fails, and **No module named'Crypto loaded** is displayed.
The build fails, and **No module named 'Crypto'** is displayed.
-**Possible Causes**
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
```
### "xx.sh : xx unexpected operator" Displayed During the Build Process
### "xx.sh: xx unexpected operator"
-**Symptom**
The compilation fails, and **xx.sh [: xx unexpected operator** is displayed.
The build fails, and **xx.sh [: xx unexpected operator** is displayed.
-**Possible Causes**
The compilation environment is shell instead of bash.
The build environment shell is not bash.
-**Solution**
...
...
@@ -126,20 +118,18 @@
```
### "Could not find a version that satisfies the requirement six>=1.9.0" Displayed During the Build Process
### "Could not find a version that satisfies the requirement six>=1.9.0"
-**Symptom**
The following error occurs during compilation and building:
The following information is displayed during the build process:
```
Could not find a version that satisfies the requirement six>=1.9.0
```
-**Possible Causes**
**six** is not installed.
...
...
@@ -149,88 +139,81 @@
Method 2: Install **six** offline.
Download the installation package from [PyPI](https://pypi.org/project/six/#files).
FAQs are used to help developers solve problems frequently encountered during development. They cover a wide range of topics.
## Environment setup
## Environment Setup
### Mini and Small Systems
-[What should I do if garbled characters and segmentation faults occur during hb installation?](../faqs/faqs-environment-setup.md)
-hb installation
-[What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?](../faqs/faqs-environment-setup.md)
-[What should I do if garbled characters and segmentation faults occur during hb installation?](../faqs/faqs-environment-setup.md)
-[What should I do if the message "module 'platform' has no attribute 'linux_distribution'" is displayed during hb installation?](../faqs/faqs-environment-setup.md)
-[What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?](../faqs/faqs-environment-setup.md)
-[What should I do if the message "Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation?](../faqs/faqs-environment-setup.md)
-[What should I do if the message "module 'platform' has no attribute 'linux_distribution'" is displayed during hb installation?](../faqs/faqs-environment-setup.md)
-[What should I do if the message "configure: error: no acceptable C compiler found in $PATH" is displayed during Python 3 installation?](../faqs/faqs-environment-setup.md)
-[What should I do if the message "Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation?](../faqs/faqs-environment-setup.md)
-[What should I do if the message "-bash: make: command not found" is displayed during Python 3 installation?](../faqs/faqs-environment-setup.md)
-Python3 Installation
-[What should I do if the message "zlib not available" is displayed during Python 3 installation?](../faqs/faqs-environment-setup.md)
-[What should I do if the message "configure: error: no acceptable C compiler found in $PATH" is displayed during Python 3 installation?](../faqs/faqs-environment-setup.md)
-[What should I do if the message "No module named 'Crypto'" is displayed during the build process?](../faqs/faqs-environment-setup.md)
-[What should I do if the message "-bash: make: command not found" is displayed during Python 3 installation?](../faqs/faqs-environment-setup.md)
-[What should I do if the message "zlib not available" is displayed during Python 3 installation?](../faqs/faqs-environment-setup.md)
-[What should I do if the message "No module named 'Crypto'" is displayed during the build process?](../faqs/faqs-environment-setup.md)
-[What should I do when an error with lsb_release occurs during kconfiglib installation?](../faqs/faqs-environment-setup.md)
...
...
@@ -35,25 +39,25 @@ FAQs are used to help developers solve problems frequently encountered during de
### Mini and Small Systems
-["usr/sbin/ninja: invalid option -- w" Displayed During the Build Process](../faqs/faqs-building.md)
-["line 77: mcopy: command not found" Displayed During the Build Process](../faqs/faqs-building.md)
-["line 77: mcopy: command not found"](../faqs/faqs-building.md)
-["riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory" Displayed During the Build Process](../faqs/faqs-building.md)
-["riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory"](../faqs/faqs-building.md)
-["No module named 'Crypto'" Displayed During the Build Process](../faqs/faqs-building.md)
-["No module named 'Crypto'"](../faqs/faqs-building.md)
-["xx.sh : xx unexpected operator" Displayed During the Build Process](../faqs/faqs-building.md)
-["xx.sh : xx unexpected operator"](../faqs/faqs-building.md)
-["Could not find a version that satisfies the requirement six>=1.9.0" Displayed During the Build Process](../faqs/faqs-building.md)
-["Could not find a version that satisfies the requirement six>=1.9.0"](../faqs/faqs-building.md)
-["cannot find -lgcc" Displayed During the Build Process](../faqs/faqs-building.md)
-["cannot find -lgcc"](../faqs/faqs-building.md)
-[The Message Indicating Python Cannot Be Found Is Displayed During the Build Process](../faqs/faqs-building.md)
-[Failed to Find Python](../faqs/faqs-building.md)
-[The Message Indicating Python 3 Cannot Be Found Is Displayed During the Build Process](../faqs/faqs-building.md)
-[Failed to Find Python 3](../faqs/faqs-building.md)
## Burning
...
...
@@ -173,6 +177,6 @@ FAQs are used to help developers solve problems frequently encountered during de
### hdc
-[Why does hdc_std fail to connect to a device?](../faqs/faqs-system-applications.md)
-[hdc_std Failed to Connect to a Device](../faqs/faqs-system-applications.md)
-[hdc_std fail to run](../faqs/faqs-system-applications.md)
-[hdc_std Failed to Run](../faqs/faqs-system-applications.md)
### Failure in running the KV store on the LiteOS-A kernel (Hi3516 or Hi3518) due to incorrect path setting for the KV store
### Failed to Run a KV Store on LiteOS-A (Hi3516 or Hi3518)
**Symptom**
...
...
@@ -119,9 +119,10 @@ The component added to the **.hml** file cannot be displayed.
**Solution**
(1) Check whether the width and height values are set explicitly.
1. Check whether the width and height values are set explicitly.
2. Check whether the style of the component is set correctly.
(2) Check whether the style of the component is set correctly.
### How do I implement scrolling on a page?
...
...
@@ -174,27 +175,29 @@ If the total length of child components, except for the first and last ones, is
Do not include too many elements in an array. Avoid frequent operations on a large array.
## HDC FAQs
## hdc
### Why does hdc_std fail to connect to a device?
### hdc_std Failed 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.
Run the **hdc kill** command to terminate the hdc_std process or run the **hdc start -r** command to restart the hdc service. Then, run the **hdc list targets** command to check whether device information can be obtained.
3. hdc_std does not match the device.
If the latest image is burnt on the device, the latest hdc_std version must be used.