How to Retrieve the Android Sdk Version

How to retrieve the android sdk version?

The String Build.VERSION.RELEASE will give you the user-visible version string (i.e 1.5, 1.6, 2.0), while Build.VERSION.SDK_INT will give you a value from Build.VERSION_CODES that would be better to use if you want to compare against it programatically.

How to determine the version of android SDK installed in computer?

<Program files>\Android\Android-sdk\platforms\<platform SDK's>

On a 32bit machine:
"<Program files>" will be \Program Files\

On a 64bit machine:

If you installed the 32bit ADT, "<Program files>" will be \Program Files (x86)\

If you installed the 64bit ADT, "<Program files>" will be \Program Files\

Android SDK location

Do you have a screen of the content of your folder? This is my setup:



I hope these screenshots can help you out.

Android SDK: retrieve version of sdk tools from CLI?

You can parse (for example using awk) the file which is located at <android-sdk>\tools.

The Pkg.Revision value indicates the version of the SDK Tools component.

Determining the latest stable Android SDK

I use these links to find the latest. Mostly the android website:

compileSdk & targetSdk: Scroll down to platforms table. Both are equal to the latest platform version's API i.e. 27

supportLibVersion: Whichever one is a stable release

gradle & plugin version: Be sure to updgrade gradle & plugin from this page

googlePlayServicesVersion: Scroll to the table and whatever the tailing number is on each row

buildToolsVersion: Apparently you dont need to declare build tools anymore after gradle version 3.0.0 but just in case you need it

firebase: Find all libs as needed

I usually set the following in my project level build.gradle and set a variable for it to use in my other build.gradle:

ext {
compileSdkVersion = xxxx
targetSdkVersion = xxxx
supportLibVersion = "xxxx"
buildToolsVersion = "xxxx"
googlePlayServicesVersion = "xxxx"

If you keep those bookmarked you should be able to find the latest for each easily

How to check Android SDK version, Android Build Tools version and Android Support Repository version in Android studio?

Configurations related to the minSdkVersion, targetSdkVersion and buildToolsVersions which are used in the project are in build.gradle of your app module. You can configure it to use any other version as per your requirements.

Sample Image

Android Support Repository version of a project in Android studio?

Now support libraries have been changed to androidx and are a part of Jetpack. Previous support libraries included in the android studio are deprecated now. You can read about these here.

How to check android sdk version in Ubuntu through terminal?

The two methods you posted are applicable for Android devices not for a computer that has Android SDKs installed to develop. You should have many Android SDKs installed on your Ubuntu machine.

The check in the terminal all the SDKs in your machine you can use sdkmanager tool:

${ANDROID_HOME}/tools/bin/sdkmanager --list

It will show you three main blocks: Installed packages, Available Packages and Available Updates.

You can use the same tool to update and install/uninstall packages too.

Related Topics

Leave a reply