Unity Engine documentation Script Reference UnityEditor AndroidSdkVersionFull Represents an Android SDK version with an optional minor component, for example 36.1.
Read time 2 minutes
Last updated 6 days ago Definition
public class AndroidSdkVersionFull : IEquatable<AndroidSdkVersionFull>, IComparable<AndroidSdkVersionFull>
Android publishes minor SDK releases within a major API level, such as 36.1, as separate installable platforms alongside the major release. Unlike
AndroidSdkVersions , which only lists whole API levels, this type can represent a specific minor release. Use it with
PlayerSettings.Android.compileSdkVersion .
Examples
using UnityEngine; using UnityEditor; using UnityEditor.Build; public class AndroidSdkVersionFullSample : MonoBehaviour { [MenuItem("Build/AndroidSdkVersionFull Sample")] public static void BuildAndroidSdkVersionFullSample() { PlayerSettings.SetScriptingBackend(NamedBuildTarget.Android, ScriptingImplementation.IL2CPP); PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARM64; // Compile against 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); } }
Static Fields
Value Description AndroidApiLevelAuto Compile against the highest Android SDK platform installed on the machine.
Constructors
Properties
Property Description Major The major API level, for example 36. Minor The minor version of the major API level, such as 1 for API level 36.1. This value defaults to 0 when the release has no minor version.
Methods
Method Description ToString Formats this Android SDK version as a string.
Static Methods
Method Description TryParse Tries to parse an Android SDK version from a string, for example or .
Operators
Operator Description operator > Returns whether the left-hand Android SDK version is higher than the right-hand one. operator >= Returns whether the left-hand Android SDK version is higher than or equal to the right-hand one. operator < Determines whether the left-hand Android SDK version is lower than the right-hand one. operator <= Returns whether the left-hand Android SDK version is lower than or equal to the right-hand one.