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.
Important: If you manually configure the Compile API Level, make sure it’s equal to or higher than Target API Level. Setting it lower triggers a warning in Unity and can cause the build to fail.
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.
To configure the Target API Level, follow these steps:
Unity writes this value to your application’s AndroidManifest.xml 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.
To configure the Compile API Level, follow these steps:
If you select a Compile API Level that’s not installed on your computer, Unity displays a prompt where you can choose to either: