Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AndroidSdkVersionFull

Represents an Android SDK version with an optional minor component, for example 36.1.
Read time 2 minutesLast updated 6 days ago

Definition

public class AndroidSdkVersionFull : IEquatable<AndroidSdkVersionFull>, IComparable<AndroidSdkVersionFull>

Remarks

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.
Internally, Unity encodes an AndroidSdkVersionFull as a single integer (major * 1000 + minor) * 1000. A
major
value of 0 represents AndroidSdkVersionFull.AndroidApiLevelAuto.

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

AndroidApiLevelAutoCompile against the highest Android SDK platform installed on the machine.

Constructors

Constructor

Description

AndroidSdkVersionFull(System.Int32,System.Int32)Creates an Android SDK version from a major API level and an optional minor version.

Properties

Property

Description

MajorThe major API level, for example 36.
MinorThe 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

ToStringFormats this Android SDK version as a string.

Static Methods

Method

Description

TryParseTries to parse an Android SDK version from a string, for example
36
or
36.1
.

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.