android5.0 compiling

Source: Internet
Author: User

android5.0 compilation requires a jdk1.7 version, you may need to maintain two versions of JDK in the future, please refer to:

Online installation openjdk1.7

sudo apt-get install Openjdk-7-jre openjdk-7-jdk

Offline Bin package installation requires manual addition of configuration options

sudo update-alternatives--install/usr/bin/java Java/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 50

Switch JDK version

sudo update-alternatives--config java

Toggle Javac Version

sudo update-alternatives--config javac

Note: If you only see partial JDK options, you need to add the. jinfo file yourself and register with Update-alternatives--install

Dynamic registration Java_home

java_home=$ (readlink-f/usr/bin/java | sed "S:bin/java::")

------------------------------------

By the way, the role of Javac and Java

Javac compiling Java files into class files
Java executes the class file.

Javac:java--->class
Java: Run class

android5.0 compiling

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.