Build the Android Application Development Environment and system compilation environment on Ubuntu14.10, and ubuntu14.10android
Build an android Application Development Environment
- Install and configure Java JDK.
- Download and install Android NDK.
- Android ADT downloads and installs the configuration.
- Download the Android SDK.
- Android Elicpse installation configuration.
- Android Studio installation configuration.
# Download and install Oracle JDK ##
- JDK 6:
Http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html
- JDK 7:
Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
- JDK 8:
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- The URL of Baidu online storage is as follows:
Http://pan.baidu.com/s/1sjNtIax
Install JDK under Ubuntu14.10 and configure multiple version Switches
- JDK1.6 installation:
Use the update-alternatives tool to create a link file.
Sudo update-alternatives-install "/usr/bin/java" "java" "usr/lib/jvm/jdk6/jdk1.6.0 _ 43/bin/java" 1
- The other results are as follows:
zshh@HP:/usr/bin$ ls -l |grep jalrwxrwxrwx 1 root root 21 Dec 5 2014 jar -> /etc/alternatives/jarlrwxrwxrwx 1 root root 22 Mar 30 09:59 java -> /etc/alternatives/javalrwxrwxrwx 1 root root 23 Dec 5 2014 javac -> /etc/alternatives/javaclrwxrwxrwx 1 root root 25 Dec 5 2014 javadoc -> /etc/alternatives/javadoclrwxrwxrwx 1 root root 23 Dec 22 17:04 javah -> /etc/alternatives/javahlrwxrwxrwx 1 root root 23 Apr 29 07:20 javap -> /etc/alternatives/javaplrwxrwxrwx 1 root root 24 Jun 16 00:35 javaws -> /etc/alternatives/javaws
zshh@HP:/etc/alternatives$ ls -l |grep javalrwxrwxrwx 1 root root 38 Jun 16 00:31 jar -> /usr/lib/jvm/java6/jdk1.6.0_43/bin/jarlrwxrwxrwx 1 root root 39 Jun 15 00:43 java -> /usr/lib/jvm/java6/jdk1.6.0_43/bin/javalrwxrwxrwx 1 root root 40 Jun 15 23:54 javac -> /usr/lib/jvm/java6/jdk1.6.0_43/bin/javaclrwxrwxrwx 1 root root 42 Jun 15 00:47 javadoc -> /usr/lib/jvm/java6/jdk1.6.0_43/bin/javadoclrwxrwxrwx 1 root root 40 Jun 15 00:48 javah -> /usr/lib/jvm/java6/jdk1.6.0_43/bin/javahlrwxrwxrwx 1 root root 40 Jun 16 00:27 javap -> /usr/lib/jvm/java6/jdk1.6.0_43/bin/javaplrwxrwxrwx 1 root root 41 Jun 16 00:38 javaws -> /usr/lib/jvm/java6/jdk1.6.0_43/bin/javaws
Make sure that the above links are correct. Otherwise, the system prompts that the software is not installed when the command is executed.
JDK1.7 installation: the installation process is exactly the same as that of jdk.
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/java7/jdk1.7.0_80/bin/java" 2 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java7/jdk1.7.0_80/bin/javac" 2sudo update-alternatives --install "/usr/bin/jar" "jar" "/usr/lib/jvm/java7/jdk1.7.0_80/bin/jar" 2sudo update-alternatives --install "/usr/bin/javap" "javap" "/usr/lib/jvm/java7/jdk1.7.0_80/bin/javap" 2sudo update-alternatives --install "/usr/bin/javadoc" "javadoc" "/usr/lib/jvm/java7/jdk1.7.0_80/bin/javadoc" 2sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/java7/jdk1.7.0_80/bin/javaws" 2
After the installation is successful, the file is as follows:
zshh@HP:/usr/bin$ ls -l |grep jalrwxrwxrwx 1 root root 21 Dec 5 2014 jar -> /etc/alternatives/jarlrwxrwxrwx 1 root root 22 Mar 30 09:59 java -> /etc/alternatives/javalrwxrwxrwx 1 root root 23 Dec 5 2014 javac -> /etc/alternatives/javaclrwxrwxrwx 1 root root 25 Dec 5 2014 javadoc -> /etc/alternatives/javadoclrwxrwxrwx 1 root root 23 Dec 22 17:04 javah -> /etc/alternatives/javahlrwxrwxrwx 1 root root 23 Apr 29 07:20 javap -> /etc/alternatives/javaplrwxrwxrwx 1 root root 24 Jun 16 00:35 javaws -> /etc/alternatives/javaws
zshh@HP:/etc/alternatives$ ls -l |grep javalrwxrwxrwx 1 root root 38 Jun 16 00:54 jar -> /usr/lib/jvm/java7/jdk1.7.0_80/bin/jarlrwxrwxrwx 1 root root 39 Jun 16 00:51 java -> /usr/lib/jvm/java7/jdk1.7.0_80/bin/javalrwxrwxrwx 1 root root 40 Jun 16 00:47 javac -> /usr/lib/jvm/java7/jdk1.7.0_80/bin/javaclrwxrwxrwx 1 root root 42 Jun 16 00:55 javadoc -> /usr/lib/jvm/java7/jdk1.7.0_80/bin/javadoclrwxrwxrwx 1 root root 40 Jun 15 00:48 javah -> /usr/lib/jvm/java6/jdk1.6.0_43/bin/javahlrwxrwxrwx 1 root root 40 Jun 16 00:55 javap -> /usr/lib/jvm/java7/jdk1.7.0_80/bin/javaplrwxrwxrwx 1 root root 41 Jun 16 00:56 javaws -> /usr/lib/jvm/java7/jdk1.7.0_80/bin/javaws
Switch JDK version
Use the following method to get zshh @ HP :~ /Desktop/android-studio/bin $ sudo update-alternatives -- config java [sudo] password for zshh: there are 2 choices for the alternative java (providing/usr/bin/java ). selection Path Priority Status defaults 0/usr/lib/jvm/java7/jdk1.7.0 _ 80/bin/java 2 auto mode 1/usr/lib/jvm/java6/jdk1.6.0 _ 43/bin /java 1 manual mode * 2/usr/lib/jvm/java7/jdk1.7.0 _ 80/bin/java 2 manual modePress enter to keep the current choice [*], or type selection number: 1