

In this list, find the first item called Android SDK Build-tools, version xx.xx.xx. For that, execute the following command: android list sdk -all However, this won’t install the build tools needed for Gradle. The packages you will most likely need are installed by the following command (replacing the “19” in android-19 with the most recent Android SDK version: android update sdk -u -filter platform-tools,android-19 If you only want to install specific parts, more information on updating the SDK is available in this StackOverflow question. Read more if you do not wish to install all packages. This will install all Android versions, so it will quite a long time. First, update the SDK itself (a few licenses will need to be accepted): android update sdk -no-ui To build your project, the Android SDK will need a few packages. If you are going to use Git, also install Git: sudo apt-get install git-core Then reload the file: source /etc/profile Edit /etc/profile.d/android.sh ( nano /etc/profile.d/android.sh) and add the following: export ANDROID_HOME="/opt/android-sdk-linux"Įxport PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH" Now some environment variables will need to be set.

You can now remove the file you just downloaded: rm CD into /opt and download the Android SDK: cd /optĪt time of writing, the following command should be executed: wget Then click Download for other platforms and copy the link of the Linux version (SDK Tools only).Īfter you have copied the link, switch over to the SSH session. To find the download location, visit the Android SDK download page. To begin, the Android SDK should be installed. I will mostly talk about the new build system called Gradle, but this article can also be used to set up an Ant build. For this article, I assume your project uses version control like Git or Subversion. Jenkins will already need to be installed, so if it hasn’t been installed yet, please follow the steps here first. In this article, Jenkins will be setup to build Android apps.
