Android compilation requires jdk1.5 installation Solution

Source: Internet
Author: User
Http://www.douban.com/group/topic/13498481/

JDK 1.6 is required for compiling android2.2, but if you have installed a later version of JDK, it is not as good as, how can you switch and install it, the following are the solutions to this problem:
A. Switch the version:
Switch JDK version, sudo Update-alternatives -- config Java
Sudo Update-alternatives -- config javac
B. Install jdk1.5.
1. To install jdk1.5, add the following content to the end of the/etc/APT/sources. list file.
Deb http://tw.archive.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse
The Deb-Src http://tw.archive.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse
2. sudo apt-Get update
3. sudo apt-Get install sun-java5-jdk
4. comment out the two rows added in/etc/APT/sources. List.
5. sudo apt-Get update
6. Export java_home =/usr/lib/JVM/Java-1.5.0-Sun (depending on the specific installation path)
7. Export android_java_home = $ java_home
After the above steps, you have installed JDK and can continue to compile android.

Related Article

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.