Jdk1.6 is required to compile android2.3.

Source: Internet
Author: User

To compile versions earlier than Android 2.3, JDK 2.3 is used, but JDK 2.3 is changed to JDK. To compile versions earlier than Android, You need to compile version, therefore, jdk1.5 and jdk1.6 must be installed on the computer. The installation method is as follows:

[Java 6: For gingerbread and newer] sudo add-Apt-repository "Deb http://archive.canonical.com/lucid partner" sudo add-Apt-repository "Deb-srchttp: // archive.canonical.com/ubuntu lucid partner "sudo apt-Get updatesudo apt-Get install sun-java6-jdksudo Update-Java-alternatives-s Java-6-sun [Java 5: for froyo and older sudo add-Apt-repository "Deb http://archive.ubuntu.com/ubuntudapper main Multiverse" Sud O add-Apt-repository "Deb http://archive.ubuntu.com/ubuntudapper-updates main Multiverse" sudo apt-Get updatesudo apt-Get install sun-java5-jdksudo Update-Java-alternatives-s Java-1.5.0-sun can be set through the method below the default JDK version of the machine: sudo Update-alternatives -- config javasudo Update-alternatives -- config javac and select a number to switch to the desired JDK version. When compiling android2.3, you need to use JDK 6. Before compiling, you need to make the following settings: Export java_home =/usr/lib/JVM/Java-6-sun   ---- Load the Java root directoryExport Path = $ java_home/bin: $ path     ---- Set environment variables (Application Files)Export classpath = $ java_home/lib. Tools. Jar ---- Set environment variables (class files)Export java_home classpath path     ---- Load the three files togetherThen you can compile it normally.

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.