Compile Android under Ubuntu to find the problem solved by the head file

Source: Internet
Author: User

Compile Android under Ubuntu to find the problem solved by the head file

When compiling Android under Ubuntu, I found a compilation error, some header files could not be found, such as:
Fatal error: Alsa/asoundlib.h: no file or directory

Online search, because some libraries are not installed caused.
You can use Apt-file to see what library the header file is in, locate the appropriate library, and install it.
Install Apt-file:
sudo apt-get install Apt-file
Find header files:
Apt-file Search header files, such as:
Apt-file Search Alsa/asoundlib.h
Find the following results:
Libasound4-dev:/usr/include/alsa/asoundlib.h
Install Libasound4-dev:
sudo apt-get install Libasound4-dev

The following errors are indicated when installing some libraries:
Errors cannot be corrected because you require certain packages to remain threaded, or they break the dependencies between packages.

Online Check the next, said to delete some sources, and then update, you can fix.
The source in my machine has not changed, so I do not know to delete those.
Manually check for updates and perform updates.
Then execute the sudo apt-get update again.
Reinstall the package again, or you have the same error.

Some people say you need to check Update Manager, settings (software source), update "Recommended Updates", open my, look at, have been selected.
But "Unsupported Updates" is also selected, kill this.
Then, in the Ubuntu software, settings (software source), Update Manager, switch "Download from" from "Chinese server" to "master server".
Back to the update Manager, re-check again, and indeed some things need to be updated to perform the update.
Then go to the command line to execute:
sudo apt-get update
Seemingly also downloaded some things, although not much.

In front of the answer, go to install the library, found OK.
It is estimated that I installed the Chinese version, so the update source is downloaded from "Chinese server" by default.

Compile Android under Ubuntu to find the problem solved by the head file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.