Skip to main content
Version: v7

Setting Android Target SDK

All Android applications must specify a target SDK version, or the version of Android that the application is designed to run on. Each year, Google releases updates to the Android operating system and subsequently bumps the version number that applications are required to target. Typically, this date is August 31st of each year. Because of this, it is important to keep your application up to date with the latest version of Android. In a Capacitor application, this is done by specifying your target SDK in the /android/variables.gradle file.

targetSdkVersion = 34

Capacitor Android Requirements

In Capacitor, the Android target SDK version is strongly tied to the major version of Capacitor. This means that while you could change the target SDK to a higher version and rebuild your application, there's a very strong likelihood that your application will experience issues not otherwise present. The Capacitor team releases a new major version of Capacitor every year that includes support for the new target SDK version to ensure that applications remain compliant with Google's requirements. For this reason, it is important to keep your application up to date with the latest major version of Capacitor.

Android Target SDK Matrix

The following table shows the target SDK versions that are supported by Capacitor Android.

Capacitor AndroidTarget SDK Version
6.x34
5.x33
4.x32
3.x30
2.x29
1.x28

Custom Target SDK Versions

Capacitor Android does not support custom target SDK versions. Each version of Capacitor Android requires a specific target SDK version and support is only provided for that matching version.