Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

AndroidSdkVersionFull

class in UnityEditor

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Represents an Android SDK version with an optional minor component, for example 36.1.

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.

Additional resources: AndroidSdkVersions, PlayerSettings.Android.compileSdkVersion

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 Properties

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

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.

Constructors

Constructor Description
AndroidSdkVersionFullCreates an Android SDK version from a major API level and an optional minor version.

Public 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 <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.
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.