[Original] Compile the Android source process encountered problems

Source: Internet
Author: User

The process of compiling Android source code refer to the Android website:

1, download the Android source code step: https://source.android.com/source/downloading.html

2, compile the Android source code step: https://source.android.com/source/building-running.html

Here are some of the problems I have encountered:

1. JDK-related error when Compile Android Source:

Error 1:target release 1.5 conflicts with default source release 1.7   Workaround: Best use JDK for 1.6.0.45 version   error 2: [ Out/target/common/obj/java_libraries/core_intermediates/classes-full-debug.jar] Error 41  Workaround: JDK version is too low, Upgrade JDK version to 1.6.0.45  about download jdk 1.6.0.45 reference: https://ivan-site.com/2012/05/ DOWNLOAD-ORACLE-JAVA-JRE-JDK-USING-A-SCRIPT/ 2, Linux to modify the JDK installed through the command line, using their own installed Jdksudo update-alternatives-- Install /usr/bin/jar jar /opt/java/jdk1.6.0_45/bin/jar 60sudo update-alternatives--install/usr/ Bin/java Java/opt/java/jdk1.6.0_45/bin/java 60sudo update-alternatives--install/usr/bin/javac Javac /opt/java /jdk1.6.0_45/bin/javac 60sudo update-alternatives--INSTALL/USR/BIN/JAVAP javap /opt/java/jdk1.6.0_45/bin/ JAVAP 60sudo update-alternatives--install/usr/bin/javadoc javadoc /opt/java/jdk1.6.0_45/bin/javadoc 60     sudo update-alternatives--config jar sudo update-alternatives--config Javasudo Update-alternatives--config JavacsUdo Update-alternatives--config Javapsudo update-alternatives--config javadoc  When you config, you will be prompted as follows: There is 2 Choices for the Alternative Jar (Providing/usr/bin/jar).

Selection Path Priority Status
------------------------------------------------------------
0/usr/lib/jvm/java-7-openjdk-amd64/bin/jar 1071 Auto Mode
* 1/opt/java/jdk/bin/jar Manual mode
2/usr/lib/jvm/java-7-openjdk-amd64/bin/jar 1071 Manual modepress Enter to keep the current choice[*], or type selection n Umber: Follow the prompts to select the number of the path you are using. 3, Ubuntu 14.04 Android 4.4.2 Compile error OSError: [Errno 2] No such file or directory error: [out/target/product/generic/obj/gyp/s Hared_intermediates/blink/cssvaluekeywords.cpp] Error 1 Workaround: Install the following required system environment to recompile: Git GnuPG Flex Bison gperf build-essent IalZipCurlLibc6-devlibncurses5-dev:i386X11proto-core-devlibx11-dev:i386libreadline6-dev:i386G++-multilibMingw32TofrodosPython-markdownlibxml2-utilsXsltproczlib1g-dev:i386 

such as the installation of Git, as below, the other is the same, each installation can.

sudo apt-get install git

Finally, if the following output appears, the installation succeeds:

Installed system FS IMAGE:OUT/TARGET/PRODUCT/GENERIC/SYSTEM.IMG

Target Ram Disk:out/target/product/generic/ramdisk.img

Target UserData FS Image:out/target/product/generic/userdata.img

Installed file List:out/target/product/generic/installed-files.txt

[Original] Compile the Android source process encountered problems

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.