Programming

Android SDK

What is Android SDK?

The SDK gives the platform API, the build tools, the emulator, and adb. Android Studio installs them with SDK Manager. The app’s code is Kotlin or Java. The SDK is the side that turns that code into a package the phone understands, an APK or an AAB.

What is Android SDK used for?

An Android package does not build without the SDK. Studio can hide it, but the build still goes through it.

  • Choosing an API level with compileSdk
  • Opening the app in an emulator
  • Connecting a phone with adb
  • Installing platform-tools and build-tools

What can you do with Android SDK?

With the SDK you test the app in an emulator, install it on a phone, and read the log. It does not replace the design or the logic. Learning the language is a separate job. The SDK is only the tool of the target platform.

Is Android SDK hard to learn?

The first install is long because the platform and the emulator are large. The difficulty is version fit: compileSdk, build-tools, and Gradle must agree in one project. The path can be pointed to with ANDROID_HOME.

Advantages and limits

Advantage: it is the official tool, and the emulator and adb are together. Limit: it takes disk and time, and the license terms have to be accepted. Updating the SDK can suddenly break an old project.

Basic ideas

The API level is tied to the phone’s system version. A high compileSdk opens a new API. minSdk says whether an old phone is cut off.

  • adb lives in platform-tools
  • The emulator opens a virtual phone
  • build-tools packs the app
  • SDK Manager shows a missing package

A short example

These commands look at installed packages and a connected phone. sdkmanager must be on PATH.

sdkmanager --list
adb devices

Common questions

  • Are the Android SDK and Android Studio the same? No. Studio is the editor. The SDK is the build set.
  • Is the SDK a language? No. The language is Kotlin or Java.
  • Does every project use the same SDK version? No. compileSdk is written inside the project.