# compileSdkVersion

> The API level to compile your application against.

## Definition

* **Type:** Property
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static AndroidSdkVersionFull compileSdkVersion { get; set; }
```

### Remarks

This value must be higher than or equal to `targetSdkVersion`. Set this to [AndroidSdkVersionFull.AndroidApiLevelAuto](/engine/6000.7/script-reference/unityeditor/androidsdkversionfull/androidapilevelauto.md) (or 0, or null) to compile against the highest Android SDK platform installed on your machine, independently of [PlayerSettings.Android.targetSdkVersion](/engine/6000.7/script-reference/unityeditor/playersettings/android/targetsdkversion.md).

### Examples

```csharp
using UnityEngine;
using UnityEditor;
using UnityEditor.Build;

public class CompileSdkVersionSample : MonoBehaviour
{
    [MenuItem("Build/CompileSdkVersion Sample")]
    public static void BuildCompileSdkVersionSample()
    {
        PlayerSettings.SetScriptingBackend(NamedBuildTarget.Android, ScriptingImplementation.IL2CPP);
        PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARM64;

        //Set compileSdkVersion to API level 36.1
        PlayerSettings.Android.compileSdkVersion = new AndroidSdkVersionFull(36, 1);

        BuildPlayerOptions options = new BuildPlayerOptions();
        options.scenes = new[] { "Assets/Scenes/SampleScene.unity" };
        options.locationPathName = "Build/AndroidBuild.apk";
        options.target = BuildTarget.Android;
        options.targetGroup = BuildTargetGroup.Android;
        BuildPipeline.BuildPlayer(options);
    }
}
```
