# 1.2 SDK Management

## What is an SDK?

Each Android device has installed on it a version of the Android Operating System (OS); The latest version is Android 10, which came out in August of 2019. Each version of the Android OS corresponds to a unique Software Development Kit (or SDK) -- Android 10 is running SDK 29. An SDK can be thought of as all the tools that can be used by the developer when developing an application that will run on that device.

The minimum SDK sets the lowest level possible that a system must have to run your app. For example, if the SDK of an Android project was set to 22, then any phones with SDK 22 or higher could run that project. This minimum SDK level for is set with the `minSdkVersion` field in your application’s `app/build.gradle` file. Don’t worry about manipulating this for now -- just know this file is used for managing all the dependencies that are necessary for your application to run.

## Tradeoffs with SDK Versions

Google is constantly releasing interesting new features in their latest SDKs, but a developer should be cautious of immediately implementing these features. Using something in the codebase that is reliant on having a high SDK like 28 or 29 can lead to some drastic consequences.

Only around 10% of Android users are running SDK 28 or above, while over 80% have an SDK ≥ 21. So if your app was reliant on a brand new feature that Google developers just released in August (i.e. special geolocation calculations), you would need to raise your `minSdkVersion` to 29. This means that the app will crash on any devices with a SDK level under 29.&#x20;

Raising the minimum supported SDK version prevents older devices from downloading your application and limits the target audience

Here is a table of the percentage of Android users who own a device that supports a specific SDK version.&#x20;

![](https://195521982-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LvOeSx5ZqjJA8sxykMu%2F-MCFNAOxUXyvfYW-IyxC%2F-MCFOQBw9JBaKVvNDdB-%2FAnnotation%202020-07-14%20225232.jpg?alt=media\&token=21e4bb92-52af-420e-b74a-66575d101579)

In general, we recommend setting the minimum SDK supported by your application to be between 21 and 24, and raising the SDK level only when necessary.&#x20;

## SDK Manager

The Android SDK Manager handles downloading and updating the various libraries required for the different versions of Android. Here, you can download different SDKs which can then be used to create a virtual device with a specific SDK/API (to simulate testing on users with older/newer devices)

Navigate to **SDK Tools** in the SDK manager. Several things should already be installed:

* **Android SDK Build** **Tools:** required to build Android apps
* **Android SDK Platform** **Tools:** required to communicate with Android devices through the Android Debug Bridge (also known as ADB)
* **Android SDK Tools:** required to simulate a specific Android SDK
* **Android Emulator:** required to run any emulator

Generally, you would be needing to visit the SDK Manager unless the SDK version of your application changes.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://android-course.cornellappdev.com/chapters/1.-introduction-to-the-editor/1.2-sdk-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
