Comment on page
1.2 SDK Management
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
minSdkVersionfield in your application’s
app/build.gradlefile. 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.
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
minSdkVersionto 29. This means that the app will crash on any devices with a SDK level under 29.
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.
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.
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.