Facebook

The Unity Android SDK: A Comprehensive Guide

by Michael Sacco Published January 4, 2024

What is Android?

Android is a popular mobile OS designed for phones and tables. You can use Unity to make and build 2D and 3D games to Android devices.

We recommend using Universal Render Pipeline to build applications for Android. The Universal Render Pipeline is highly customizable, so you can fine-tune your rendering requirements to meet your performance targets for your game.

Unity is a cross-platform game engine, but we recommend that you learn native Android development, too. This will make you a more well-rounded developer and give you the knowledge base to build complex applications with Unity.

What is an SDK?

An SDK is a Software Development Kit. An SDK is a set of tools to develop and build for a specific target platform. Google offers an SDK for Android to enable developers to develop and build for Android.

Why do I need the Android SDK for Unity?

If you want to build to Android, you need the SDK. In addition to the SDK, Unity requires a Java Development Kit, Android SDK Tools, Android NDK, and Android Gradle installation.

You can install all these requirements in one shot using Unity’s Module installer.

What is an NDK?

An NDK is a Native Development Kit. The Android NDK enables you to build applications that run natively in C and C++ in Android. In contrast, the Android SDK executes natively in Java. C and C++ native code is necessary to overcome performance barriers that exist in Java.

Why do I need the Android NDK for Unity?

Unity compiles to C++ native code for Android to deliver highly optimized applications. You need the Android NDK to support native C/C++ development for Android.

Customize Android SDK, NDK, Gradle, JDK Installation in Unity

You can customize the specific JDK, SDK, NDK, and Gradle installation your project references, too.

To do so, navigate to Edit > Preferences > External Tools > Android.

Then, disable the default option and enter the path to your custom installation.

What do I need to build to Android with Unity?

To build to Android, your Unity project requires the following dependencies:

  • Android Build Support module
  • Android SDK
  • Android NDK
  • OpenJDK

https://developer.android.com/studio#command-tools
https://developer.android.com/ndk/
http://openjdk.java.net/

When you install the Android Build Support module, Unity also installs the SDK, NDK, and OpenJDK modules.

How do I install the Android SDK in Unity?

To create a Unity application for Android, you first need to set up your Unity project to support Android.

  1. Open your Unity Hub
  2. Navigate to Installs
  3. Open the Install’s Add Modules panel
  4. Select the Android Build Support module
  5. Click Install

Unity will install the Android SDK, Android NDK, and the Java Development Kit into your AndroidPlayer folder: <EditorVersion>/Editor/Data/PlaybackEngines/AndroidPlayer/.

References

Further Reading

Free download: Indie Game Marketing Checklist

Download now

Category

mobile

Don't forget to share this post!

Popular assets for Unity

See all assets ->
    Cutting-edge volumetric fog and volumetric lighting with support for transparent materials.
    Volumetric clouds, day night cycles, dynamic skies, global lighting, weather effects, and planets and moons.
    A lightweight procedural skybox ideal for semi-stylized projects.
    Image-based Outlines for 2D and 3D games with variable line weight, color, and displacement options.
    Per-pixel gaussian blur on your entire screen, part of the UI, or in-scene objects.
    Drag-and-drop ready-to-use ambient, impact, and spell particle effects.

Free Indie Game Marketing Checklist

Learn how to make your game successful with this handy checklist.

Download for free