### "usr/sbin/ninja: invalid option -- w" Displayed During the Build Process
### "usr/sbin/ninja: invalid option -- w"
-**Symptom**
-**Symptom**
The build fails, and **usr/sbin/ninja: invalid option -- w** is displayed.
The compilation fails, and **usr/sbin/ninja: invalid option -- w** is displayed.
-**Possible Causes**
-**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**
-**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**
-**Symptom**
The build fails, and **/usr/bin/ld: cannot find -lncurses** is displayed.
The compilation fails, and **/usr/bin/ld: cannot find -lncurses** is displayed.
-**Possible Causes**
-**Possible Causes**
The ncurses library is not installed.
The ncurses library is not installed.
-**Solution**
-**Solution**
...
@@ -39,17 +36,15 @@
...
@@ -39,17 +36,15 @@
```
```
### "line 77: mcopy: command not found" Displayed During the Build Process
### "line 77: mcopy: command not found"
-**Symptom**
-**Symptom**
The build fails, and **line 77: mcopy: command not found** is displayed.
The compilation fails, and **line 77: mcopy: command not found** is displayed.
-**Possible Causes**
-**Possible Causes**
mcopy is not installed.
Mcopy is not installed.
-**Solution**
-**Solution**
...
@@ -58,35 +53,34 @@
...
@@ -58,35 +53,34 @@
```
```
### "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**
-**Symptom**
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**
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**
-**Possible Causes**
You do not have the required permission to access files in the RISC-V compiler directory.
Permission is required to access files in the **riscv** compiler path.
-**Solution**
-**Solution**
1. Run the following command to query the directory where **gcc_riscv32** is located:
1. Run the following command to locate **gcc_riscv32**:
```
```
which riscv32-unknown-elf-gcc
which riscv32-unknown-elf-gcc
```
```
2. Run the **chmod** command to change the directory permission to **755**.
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**
-**Symptom**
The compilation fails, and **No module named'Crypto loaded** is displayed.
The build fails, and **No module named 'Crypto'** is displayed.
-**Possible Causes**
-**Possible Causes**
...
@@ -106,17 +100,15 @@
...
@@ -106,17 +100,15 @@
```
```
### "xx.sh : xx unexpected operator" Displayed During the Build Process
### "xx.sh: xx unexpected operator"
-**Symptom**
-**Symptom**
The build fails, and **xx.sh [: xx unexpected operator** is displayed.
The compilation fails, and **xx.sh [: xx unexpected operator** is displayed.
-**Possible Causes**
-**Possible Causes**
The build environment shell is not bash.
The compilation environment is shell instead of bash.
-**Solution**
-**Solution**
...
@@ -126,12 +118,11 @@
...
@@ -126,12 +118,11 @@
```
```
### "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**
-**Symptom**
The following information is displayed during the build process:
The following error occurs during compilation and building:
```
```
...
@@ -140,7 +131,6 @@
...
@@ -140,7 +131,6 @@
-**Possible Causes**
-**Possible Causes**
**six** is not installed.
**six** is not installed.
-**Solution**
-**Solution**
...
@@ -149,21 +139,21 @@
...
@@ -149,21 +139,21 @@
Method 2: Install **six** offline.
Method 2: Install **six** offline.
Download the installation package from [PyPI](https://pypi.org/project/six/#files).
1.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.
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
### 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)
-[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
...
@@ -35,25 +39,25 @@ FAQs are used to help developers solve problems frequently encountered during de
### Mini and Small Systems
### 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
## Burning
...
@@ -173,6 +177,6 @@ FAQs are used to help developers solve problems frequently encountered during de
...
@@ -173,6 +177,6 @@ FAQs are used to help developers solve problems frequently encountered during de
### hdc
### 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**
**Symptom**
...
@@ -119,9 +119,10 @@ The component added to the **.hml** file cannot be displayed.
...
@@ -119,9 +119,10 @@ The component added to the **.hml** file cannot be displayed.
**Solution**
**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?
### 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
...
@@ -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.
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**
-**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**
-**Solution**
1. The device cannot be identified.
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.
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.
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.
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.
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.
If the latest image is burnt on the device, the latest hdc_std version must be used.