Unreal Engine 5.1 Android packaging setup

1) Install Unreal Engine 5.1

  1. Go to https://store.epicgames.com/en-US/download and download Epic games launcher
  2. Install Epic games launcher
  3. Open Epic games launcher, go to Unreal engine -> Library, click the ‘+’ sign and install Unreal engine version 5.1.0
  4. After installation is finished, go to Options from drop down menu of 5.1.0 and make sure that target platform Android is installed

2) Install Visual Studio Community 2019

  1. Go to https://my.visualstudio.com/Downloads?q=visual%20studio%202019&wt.mc_id=o~msft~vscom~older-downloads and download the installer
  2. Open vs_community installer and click ‘Modify’
  3. Install
    1. .NET desktop development
    2. Desktop development with C++
    3. Game development with C++ (along with Unreal engine installer and Android IDE support for unreal engine)

3) Install Java

  1. Go to https://www.oracle.com/in/java/technologies/javase/javase8-archive-downloads.html and download Java SE Development Kit 8u77 installer
  2. Install with default settings
  3. Go to start menu and search ‘env’ and open Edit environment variables
  4. Create new variable ‘JAVA_HOME’ with ‘jdk1.8.0_77’ folder’s address as its value
  5. In Path variable, add ‘jdk1.8.0_77/bin’ folder’s address as its value and move it to the top of the list
  6. Check the version of java by opening the cmd app and typing ‘java -version’

4) Install Android Studio 4

  1. Go to https://android-developers.googleblog.com/2020/05/android-studio-4.html and download Android Studio 4.0 installer
  2. Install with default settings and if prompted to install API 33/32/31 uncheck the box
  3. After installation is finished go to More Action -> SDK Manager
  4. Go to SDK Platforms tab -> Select Android 11 (API Level 30)
  5. Go to SDK Tools tab -> Under Android SDK Build-Tools select 30.0.3 and 29.0.2
  6. Under Android SDK Command-line Tools select versions 8.0 to 1.0
  7. Navigate to folder ‘User>USERNAME>Appdata>Local>Android>Sdk>tools’ and open package.xml with notepad. Search for ‘obsolete’ and change its value to “false”
  8. Navigate to folder ‘User>USERNAME>Appdata>Local>Android>Sdk>cmdline-tools’ and rename folder “8.0” to “latest”
  9. Navigate to folder ‘C:\Program Files\Epic Games\UE_5.1\Engine\Binaries\ThirdParty\DotNet\6.0.302\windows\host\fxr\6.0.7’, copy the file hostfxr.dll and paste in folder ‘C:\Program Files\Epic Games\UE_5.1\Engine\Binaries\DotNET\AutomationTool’

5) Install NDK

  1. Open Android Studio 4 and go to More Action -> SDK Manager
  2. Go to tab SDK Tools -> Under NDK select ‘21.3.6528147’
  3. Navigate to folder ‘C:\Program Files\Epic Games\UE_5.1\Engine\Extras\Android’ and run file ‘SetupAndroid.bat’. It will download and install the NDK recommended by the Unreal Engine

6) Setup the Unreal Engine

  1. Open Unreal Engine 5.1.0 from Epic Launcher and follow the settings instructions given below

7) Sign the project

  1. Run ‘cmd’ app as administrator
  2. Type ‘cd C:\Program Files\Java\jdk1.8.0_77\bin’ to navigate to java bin folder
  3. Type ‘keytool -genkey -v -keystore ExampleKey.keystore -alias MyKey -keyalg RSA -keysize 2048 -validity 10000’
  4. Keystore password – ******
  5. First and Last name – TestGuy
  6. Name of your Organizational Unit – MyCompany
  7. Name of your organization – MyGame
  8. name of the City or Locality – MyCity
  9. State or Province – NC
  10. Two-letter country code for this unit – 00
  11. Is the information correct – Y
  12. Enter key password for <MyKey> – press enter
  13. Navigate to folder ‘C:\Program Files\Java\jdk1.8.0_77\bin’, copy the file ExampleKey.keystore and paste in project folder ‘C:\Users\USERNAME\Documents\Unreal Projects\PROJECTNAME\Build\Android’
  14. In Unreal Engine, navigate to Project settings -> Platforms -> Android -> Distribution signing and enter the details used for generating the keystore file (as given below)

8) Package the project

  1. In Unreal Engine go to Platforms -> Android -> Package project
  2. Select any folder location where you want to save the files