Compile Android5.0.2 source code on ubuntu14.10

Source: Internet
Author: User

Compile Android5.0.2 source code on ubuntu14.10

April 14, 2015 Android No comments read 2,064 times ubuntu14.10 compile Android5.0.2 source code
The previous article said ubuntu14.10 on the Android5.0.2 source download the specific steps, this article is about ubuntu14.10 compiled Android5.0.2 source of those things.
1. Install the JDK first
Here I am using OPENJDK, many people on the internet about the JDK use Jdk5, jdk6, Jdk7 or openjdk have been arguing, I chose Openjdk7, the final proof can be compiled through.
sudo apt-get install OPENJDK-7-JDK
When installed, set environment variables:
sudo gedit/etc/profile
End of File Plus
java_home=/usr/lib/jvm/java-7-openjdk-amd64/
Path= < Span class= "Mrow" id= "mathjax-span-2" > p a t h : Home/bin: $JAVA _home/bin
Export Java_home
Export PATH
2. Installing CCache
sudo apt-get install CCache
SOURCE ~/.BASHRC
3. Install other dependent software
Do not install in advance, or compile error, will waste more than n time.
sudo apt-get install Git-core
sudo apt-get install git
sudo apt-get install GnuPG
sudo apt-get install Flex
sudo apt-get install Bison
sudo apt-get install Gperf
sudo apt-get install build-essential
sudo apt-get install zip
sudo apt-get Install Curl
sudo apt-get install Libc6-dev
sudo apt-get install libncurses5-dev:i386
sudo apt-get install X11proto-core-dev
sudo apt-get install libx11-dev:i386
sudo apt-get install libreadline6-dev:i386
sudo apt-get install Libgl1-mesa-dev
sudo apt-get install G++-multilib
sudo apt-get install Mingw32
sudo apt-get install Tofrodos
sudo apt-get install Python-markdown
sudo apt-get install libxml2-utils
sudo apt-get install Xsltproc
sudo apt-get install zlib1g-dev:i386
sudo apt-get install Dpkg-dev
4. Download additional Hardware Drivers
To here, rely on the basic software to complete, the rest on the basis of their own needs, download other hardware drivers, I was compiled NEXUS6 system image image, so also need to download NEXUS6 hardware driver, detailed reference to this article.
Http://jileniao.net/post-154.html
5. Go to the source directory
CD Android
Prebuilts/misc/linux-x86/ccache/ccache-m 50G
6. Load Environment variables
. build/envsetup.sh

7. Select the lunch option
Lunch

According to the test machine NEXUS6, that is Shamu, so I chose 21.
8. Start compiling
Make
After the final compilation, I took 11 hours and 48 minutes.
Image
Host C + +: liblatinime_host_static_for_unittests_32 <= packages/inputmethods/latinime/native/jni/src/suggest/ Policyimpl/dictionary/structure/backward/v402/content/shortcut_dict_content.cpp
Host C + +: liblatinime_host_static_for_unittests_32 <= packages/inputmethods/latinime/native/jni/src/suggest/ Policyimpl/dictionary/structure/backward/v402/content/sparse_table_dict_content.cpp
Host C + +: liblatinime_host_static_for_unittests_32 <= packages/inputmethods/latinime/native/jni/src/suggest/ Policyimpl/dictionary/structure/backward/v402/content/terminal_position_lookup_table.cpp
Host C + +: liblatinime_host_static_for_unittests_32 <= packages/inputmethods/latinime/native/jni/src/suggest/ Policyimpl/dictionary/structure/backward/v402/bigram/ver4_bigram_list_policy.cpp
Host Staticlib:liblatinime_host_static_for_unittests_32 (out/host/linux-x86/obj32/static_libraries/liblatinime_ HOST_STATIC_FOR_UNITTESTS_INTERMEDIATES/LIBLATINIME_HOST_STATIC_FOR_UNITTESTS.A)
Export includes file:packages/inputmethods/latinime/native/jni/hostunittests.mk–out/host/linux-x86/obj32/ Executables/liblatinime_host_unittests_intermediates/export_includes
Host Executable:liblatinime_host_unittests (Out/host/linux-x86/obj32/executables/liblatinime_host_unittests_ intermediates/liblatinime_host_unittests)

Make completed successfully (11:48:27 (HH:MM:SS))

In the compilation I encountered the problem of stopping for a long time when compiling to libwebviewchromium.so, the workaround should refer to the following article.
Http://jileniao.net/ubunt-add-swap-to-build-libwebviewchromium.html

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Compile Android5.0.2 source code on ubuntu14.10

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.