Install with default settings and if prompted to install API 33/32/31 uncheck the box
After installation is finished go to More Action -> SDK Manager
Go to SDK Platforms tab -> Select Android 11 (API Level 30)
Go to SDK Tools tab -> Under Android SDK Build-Tools select 30.0.3 and 29.0.2
Under Android SDK Command-line Tools select versions 8.0 to 1.0
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”
Navigate to folder ‘User>USERNAME>Appdata>Local>Android>Sdk>cmdline-tools’ and rename folder “8.0” to “latest”
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
Open Android Studio 4 and go to More Action -> SDK Manager
Go to tab SDK Tools -> Under NDK select ‘21.3.6528147’
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
Open Unreal Engine 5.1.0 from Epic Launcher and follow the settings instructions given below
7) Sign the project
Run ‘cmd’ app as administrator
Type ‘cd C:\Program Files\Java\jdk1.8.0_77\bin’ to navigate to java bin folder
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’
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
In Unreal Engine go to Platforms -> Android -> Package project
Select any folder location where you want to save the files