Build an Android environment on Ubuntu and download APKs from Google Play

  
        Create a full command line Android build system
step 1 Install the JDK environment
With the android JDK best choose the JDK official version instead of the Open JDK, the following is the method to install JDK 1.7 under unbuntu.
Code is as follows:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
step 2 Install Android SDK< Br> Some command-line tools of the android sdk toolkit are based on 32-bit systems. In 64 programs running 32 programs, you must install some dependencies of i386. The method is as follows:
The code is as follows:
sudo dpkg --add -architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1
After installing the 32-bit dependent library, we use wget to download The latest android SDK package under linux.
Code is as follows:
cd ~
wget http://dl.google.com/android/android-sdk_r24.0.1-linux.tgz
tar xvzf android-sdk_r24.0.1-linux.tgz
Edit .profile or .bash_profile Add the following directory to the path search path to ensure that some of the android SDK command tools can be used directly in the terminal, such as the adb command.
The code is as follows:
ANDROID_HOME=$HOME/android-sdk-linux
export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
exprot ANDROID_HOME
Make the environment variable take effect
The code is as follows:
source ~/.profile
After the environment variable is in effect, you can use the android command to list the sdk-related list so that we can select the SDK version that matches our own project. (Just just installed the most basic SDK, to fully meet your development environment needs to choose the SDK and tool update you need from the list below)
Code is as follows:
android list sdk --all
The output looks like this:
Copyright © Windows knowledge All Rights Reserved