Download and compile Android source code from Ubuntu

Source: Internet
Author: User

Precautions for compiling android in Ubuntu:
1. See the installation instructions in http://source.android.com.
2. For problems encountered during jdk6 installation, refer to issue.
3. If a timeout error occurs during code download, see http://www.cppblog.com/fwxjj/archive/2012/05/17/175198.html:

  • Log on to https://android.googlesource.com/new-passwordin the browser and use the gmailaccount number for logon;
  • Click "Allow access" on the page to get a similar: Machine android.googlesource.com login Git-<username> .gmail.com password <password> machine android-review.googlesource.com login Git-<username> .gmail.com password <password>
  • Append the above information ~ /. The End Of The netrc file (check the permissions of the current user. If this file does not exist, create one by yourself );
  • Uri changed to https://android.googlesource.com//Platform/manifest ("/a" is added in the middle ").
  • Repo init-u https://android.googlesource.com/a/platform/manifest-B android-2.3.3_r1
  • Repo sync

4. A Java version error occurs during compilation. Please refer to step 2 to reinstall and configure JDK

5. If gcc4.6.1 is used in the new Ubuntu version, compilation errors may occur. For details, see http://blog.csdn.net/flydream0/article/details/7046612.
Sudo apt-Get install gcc-4.4
Sudo apt-Get install g ++-4.4

Sudo mv gcc. Bak
Sudo ln-s gcc-4.4 gcc

/Usr/bin $ sudo MV g ++. Bak
/Usr/bin $ sudo ln-s g ++-4.4g ++

Gcc-V
G ++-V

6.
Ubuntu 64-bit environment Android compilation error http://blog.csdn.net/lmhgen/article/details/7326083

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.