Exporting your Unity project as an APK

Export your Unity project by building an APK (for Android)

Are you planning to create a Unity game for mobile devices? Wondering how you can export your game and build it as an app on Android? Look no further — here’s a step-by-step guide to exporting your game onto your Android device, updated for 2023.

If you’re looking for a way to test your game as you’re making it, check out Unity Remote — it’s an Android app that mirrors Unity Editor’s Game screen when you are in Play Mode. Once you’ve installed it, we have a guide covering how to get Unity Remote working on your devices.

  1. APK files are Android installers
  2. Installing Android Build Support
  3. Setting the Build Platform
  4. Building the APK file
  5. Conclusion

1. APK files are Android installers

To install your game as an Android app, you need to export it as an APK file, upload it onto your Android device and run the file.

Installing an APK file on Android
How to install an APK file.

Fun fact: APK files are actually just ZIP files named with an .apk extension instead of the traditional .zip. You can change the extension of an APK to .zip and open it like you would open a ZIP file, but you can’t do much with the files inside.


Article continues after the advertisement:

Save Soil

The Save Soil Movement

Poor farming practices and policies across the world have led to the degradation of agricultural soils in the world. This has led to the loss of nutritional value in our food over the years, and it will affect our food production capabilities in the coming decades.

Learn more about Save Soil →


2. Installing Android Build Support

For Unity to be able to export your game as an APK, you need to install the Android Build Support module on the Unity Editor that you are using to build your project.

a. Is Android Build Support installed?

To check if you already have Android Build Support installed, head to the Installs tab on Unity Hub, and check if your installed Editor(s) have Android listed under them. Those that do have Android Build Support installed.

Android Build Support in Unity
The last 2 Editors installed have Android Build Support. If your Unity Hub version is 2 and below, the interface will be slightly different.

b. How to install Android Build Support

If the editor version that you are using doesn’t have Android Build Support, you’re going to have to install it by clicking on the dropdown at the top-right corner of the editor version and selecting the Add Modules option.

Unity Hub Add Module
If you’re using an older version of Unity Hub, this is how the interface looked like.

If the Add Modules option is missing, that means your Unity version was not installed using Unity Hub. You will have to uninstall that version manually and reinstall it.

This will bring you to a screen with a list of modules available for that version of the Unity Editor. Select all of the modules under the Android Build Support dropdown, then click on the Next button to install them.

Adding Android Build Support
If you are using Unity Hub version 2 and below, here is how the interface looked like then.

When it’s done, Android Build Support will be active on that version of the Unity Editor.

3. Setting the Build Platform

With Android Build Support installed, you will be able to switch the build platform of your project to Android. To do so, go to File > Build Settings and select the Android platform. Then, click on the Switch Platform button.

Switch your Build Platform in Unity
If the Switch Platform button is not there, that means your build platform is already set to Android.

4. Building the APK file

Once your platform is switched over to Android, the Switch Platform button should be replaced with a Build button. Click on the Build button, and Unity should prompt you for a location to save your APK file.

Save your APK file and upload it onto your phone. Then, open it on your phone to install it as an app!

Before you build your APK file, you may want to click on the Player Settings button at the bottom-left of the Build Settings window. In here, there is a setting that allows you to control which device orientation your game can be played on.

Player Settings - Allowed Orientations
Control what orientations are possible for the player.

If you don’t know what orientations you want to use, we recommend checking the Landscape Right and Landscape Left options, since most Unity projects are built on Desktops and Laptops, and they have landscape screen ratios.

5. Conclusion

If you run into a problem while exporting your APK, feel free to drop a comment describing your problems below. We do respond to comments on this blog, and we will reply to your comment with a list of possible solution(s). If your comment highlights a common issue that is relevant to this post, we will also update the post to mention the problem(s) you encountered, plus the suggested fixes.


Article continues after the advertisement:

Save Soil

The Save Soil Movement

Poor farming practices and policies across the world have led to the degradation of agricultural soils in the world. This has led to the loss of nutritional value in our food over the years, and it will affect our food production capabilities in the coming decades.

Learn more about Save Soil →


There are 4 comments:

  1. Thank you for providing this informative guide on exporting a Unity project as an APK for Android in 2023. It’s a valuable resource for game developers looking to bring their creations to Android devices. The step-by-step instructions, along with screenshots, make the process clear and accessible. Kudos!

  2. Pas de boutons Construire mais Exporter à la place sur la dernière version de Unity et ça ne construit pas un fichier APK mais un dossier avec pleins de sous-dossiers

  3. I have had an issue with building an apk, which isn’t necessarily related to this tutorial. But hope someone have some kind of expertise.
    The problem :Login Authentication UI works perfectly on Unity Editor, but doesn’t work on an android device.

    So I have implemented all of the features that are displayed on the Sign In screen. Logging in with PLAYFAB credentials, Signing Up, Google authentication and Facebook authentication and Guest Login using the device id. Apple authentication is yet to be executed.

    However on my android device, only the google authentication button works i.e the google icon. When It’s clicked it logs into my google play games id and Sign up i.e creating a new account.

    THE PROBLEM (persists only on an android device):

    None of my other buttons work (Log in, Play as a guest, Facebook), well they don’t even interact like buttons anymore. Atleast if they were clickable/ interactable, I would have thought it’s happening because of the code or cross checked my functions.

    So this is where it’s more weird. I get different outcomes on different devices…
    UPDATE: On one device both Google and Facebook icons are interactable and google successfully authenticates, but on another device even though google is interactable, it’s not able to authenticate, while facebook isn’t interactable at all. However login and play as guest are consistently not interactable. While on the third device google is interactable and authenticates while facbook isn’t interactable.

    Where should I be looking to fix this? What possibly is going wrong here ?

    Hope I get some kind of response. Been stuck at it for days.

    Thanks for your time.

    1. Hey Anudeep, is it possible that in your Canvas, your buttons are being blocked by another element? If you have a transparent Image element (for e.g. a black fader), it will block clicks even though it is see-through.

      It may be working on certain devices and not others because different screen resolutions change the positioning of your UI elements, and may cause different objects to be blocked.

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: You can use Markdown to format your comments.

This site uses Akismet to reduce spam. Learn how your comment data is processed.