Set up Android SDK API levels
Configure the Android SDK Target API and Compile API levels for your application.
Read time 2 minutesLast updated 15 days ago
Configure the Android SDK Target API and Compile API levels for your application.
Target API Level specifies the Android API version that your application's runtime behavior is based on. Compile API Level determines the Android API version Unity uses to compile your application. These two settings are independent and you need not set them to the same value. By default, Unity sets the Compile API Level to Automatic (Highest Installed), which uses the highest Android SDK platform version installed on your computer, independent of your Target API Level.
The Unity Hub installs the latest version of the Android SDK Target API that Google Play requires. If you need to use a more recent version, you can change it in the Android Player Settings.
Configure the Target API Level
To configure the Target API Level, follow these steps:
- Open Player settings (menu: Edit > > Player > Android).Project Settings
?
- In the Other Settings section, under Identification, change the Target API Level.
Unity writes this value to your application's file for Google Play to use. Changing the Target API Level doesn't require you to install the corresponding Android SDK platform and doesn't trigger any SDK downloads.
AndroidManifest.xmlConfigure the Compile API Level
To configure the Compile API Level, follow these steps:
- Open Player settings (menu: Edit > Project Settings > Player > Android).
- In the Other Settings section, under Identification, change the Compile API Level.
If you select a Compile API Level that's not installed on your computer, Unity displays a prompt where you can choose to either:
- Automatically download and install the corresponding Android SDK platform.
- Continue to use the highest installed version instead.