Android System build Environment

Source: Internet
Author: User

Before the company to do Android system development, the server compiled environment I came to configure, summed up a document, the document has been placed for a long time, one to share with you, and to prevent loss.

1.JDK environment variable Configuration
Upload mtkoss.tar.gz to/directory, using command: #tar –xvzf mtkoss.tar.gz
Modify the/etc/profile file to include environment variables:

JAVA_HOME=/mtkoss/jdk/1.6.0_45-ubuntu-10.04/x86_64JRE_HOME=/mtkoss/jdk/1.6.0_45-ubuntu-10.04/xCLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JRE_HOMEPATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

2. Configure Android Compilation Environment: (Can execute android_compile_env.sh script directly)

#sudo Apt-get Install Git-core GnuPG Flex Bison Gperf build-essential Zip Curl Libc6-dev Libncurses5-dev: i386 X11proto-core-dev Libx11-dev: i386 Libreadline6-dev: i386 LIBGL1-MESA-GLX: i386 Libgl1-mesa-dev g++-multilib Mingw32 OPENJDK-6-JDK Tofrodos Python-markdown libxml2-utils Xsltproc Zlib1g-dev: i386

3. Reduce the gcc/g++ version (Ubuntu default gcc/g++ version is a bit high)

# sudo apt-get install gcc-4.4
# sudo apt-get install g++-4.4
#sudo update-alternatives –install /usr/bin/gcc gcc /usr/bin/gcc-4.4 40
#sudoupdate-alternatives–install/usr/bin/g++g++/usr/bin/g++-4.440
#sudo update-alternatives –install /usr/bin/gcc gcc /usr/bin/gcc-4.6 30
#sudoupdate-alternatives–install/usr/bin/g++g++/usr/bin/g++-4.630

Select the version of gcc/g++ 4.4:

# sudo update-alternatives –config gcc
# sudo update-alternatives –config g++

In addition, the MTK code has its own compilation script root directory, ending with. SH, the default setting is the Java JDK compilation path, to be set to its own JDK compilation path to compile through.

Android System build Environment

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.