00:01What is up, everyone? Welcome back to my channel
00:03In this video, we are going to set up Android for Unreal Engine 5.5
00:05So, without further ado, let's get started
00:08 As Unreal Engine 5.5 has been released, I wanted to test some features for Android
00:13Hence, I wanted to package the Unreal project into an Android APK so I could test it on my device
00:20But for some reason, I was getting the Android SDK setup error, and I wasn't able to package the project itself
00:28 So, I quickly went to the Unreal Engine setup guide for Android SDK
00:33There, I found the proper versions of the SDK, NDK, and JDK you need for Unreal Engine 5.5 specifically
00:39However, even after following every step, I was not able to successfully build the Android APK
00:46 So, I went to the forums and searched for this query: is anyone..
00:49Able to package their Unreal project, so I saw a lot of people are struggling with packaging this Android project
00:59I searched on multiple forums, on Reddit, and even posted this query on Unreal Engine's official Discord channel
01:06Even after their support, I wasn't able to successfully build it
01:10So, after multiple iterations and trials of setting up which version of SDKs, NDK, and JDK I was successfully able to package this Unreal project for Android, so we can test the new features in Unreal Engine 5.5 on Android
01:27Well, shout out to my guy Iron Man, who helped me fix this issue quickly
01:32He's one of the amazing C++ programmers I know in the Unreal Engine community
01:38So, let's start with doing the Android Studio setup
01:40Step one is to open up the Epic Games launcher
01:44Games launcher, head up to the Library tab, and inside the Engine version, you will find Unreal Engine 5.5
01:49Now, head up to this drop-down menu and open up Options
01:56Over here, you will find Target Platforms
01:59You need to make sure that you have installed the Android Target Platform, so if it is not installed, just click on it and hit Apply, and it will automatically install the important components needed for Unreal Engine to set up Android
02:12 After this is done, it takes around 8 to 9 GB, and it does take a while to install
02:18Make sure that you close Unreal Engine if it is open in the background
02:23This will start downloading and installing this module—the Android module for Unreal Engine 5.5
02:27 Until that is finished installing, you can download the..
02:32Android Studio, and you can set that up, so to get the exact version of Android Studio you need for the Android SDKs, NDK, and JDK, let's head up to Unreal Engine's official documentation
02:41I'll just open up this Chrome browser, and we'll search for Unreal Engine Android SDK
02:49You will find this link for setting up Android SDK, NDK, and JDK for Unreal Engine
02:58When you open this up, you will see that by default it opens Unreal Engine version 4.27, which is obsolete
03:03So now, over here on the left-hand side, you will find the version you need, so select Unreal Engine 5.5
03:10Over here, you need to again search for Android, and also search for SDK, and you'll find the same link that we need for setting up Android SDK, NDK, and JDK
03:23Over here, they give the required version that we..
03:26Actually, for 5.5, what we need is Android Studio version 2024.1.2, August 29th version
03:31This one, and here is the SDK version that we need, which is SDK 34, the NDK version, and the build tools version
03:40So, we'll look up these versions once we have downloaded this Android Studio version
03:49 Where can you find this version of Android Studio? Just click on this "Advanced Android Studio Setup Guide"; this will open a new link
03:55You just have to scroll down, and you will find the Android Studio archive
04:00I'll open this in a new tab, and over here, we will then find the exact Android Studio version we need for Unreal Engine 5.5
04:06 All right, so I scroll down, agree, and I'll just find this date, [Music], itself
04:12So, yes, this is the one, and I’ll head over to..
04:23The installer is Windows 64-bit, and we'll wait for this to download, then we'll install it
04:29Once it is downloaded, just open up the .exe to start with the Android Studio setup
04:37Now, over here, make sure that you keep everything by default, even the directory of Android Studio
04:42So, I'll just install this, and once it is installed, we'll start with the SDK setup
04:51Over here, we will look up which version you will need for Unreal Engine 5.5
04:57So, let's wait for this to install, and yeah, let's start Android Studio
05:02It will open Android Studio itself
05:09So, welcome to Android Studio
05:16Over here, click on the "More Actions" dropdown menu and find the SDK Manager
05:23I already installed the SDK previously, but for you, it will not be
05:28Make sure you click on SDK version 34 over here, as it will not be enabled by default
05:37Click on this, then go to SDK Tools over here
05:41Go to SDK Tools and click on this button right here so that you can see the exact version we need for the SDK
05:54For the build tools, you will need 34.0.0, so make sure you select this; you do not need anything else
06:03All right, so after that, for the NDK version, we need NDK 25, specifically version 25.1.718, which I tested—all of these work, but this one is recommended
06:12Next, for the Android SDK Command Line Tools, pick the latest version, which is 16.0, then click on this and the CMake version
06:16You will need version 3.10.1, this one right here
06:22Then, you will also need the Android Emulator SDK, platforms, and I think that's it
06:44After this is done, it will prompt you to apply, and when you hit apply, it will download all these SDK and NDK versions from the repository and then install them in this location by default
06:57All right, once this is done, hit apply and then hit OK
07:02Now you have the proper SDK and NDK for your Android Studio
07:08 Now, what else do you need? The JDK version, Java Development Kit, which is version 17
07:15So, just select this and paste it here
07:18You will find the Java SE 17 archives
07:21From here, scroll down to Windows 64 and click on this
07:26It will install the EXE for Java
07:30 Now, I will open this up to install JDK 17
07:34So, wait for it to open up, and I've already installed it
07:42Let's reinstall it here
07:45Also, you don't need to change any directories; just stick to the default parameters, so it will install by default
07:51Hit Next
07:57Just remember, this is the directory for JDK: C:\Program Files\Java\jdk-17
08:02Hit Next, and it will be done in a few seconds
08:10So, now let's open up any Unreal Engine 5.5 project
08:15For me, I'll just launch UE5.5, and I'll select the Third Person template
08:24We'll build the Third Person template for Android
08:29We'll open this up and select the Third Person template
08:32So, I'll click on the Games tab and select the Third Person
08:37Over here, I will type "Android DPP," and the target platform here is set to Mobile
08:46File and the quality preset I'm going to set it to scalable
08:54Now, the third-person template has opened up
08:58You will find that the graphics are really low, and you will see over here in the scalability settings that it has been set to low
09:12 Why has it been set to low automatically? Because when we went to the Target Hardware, we set it to scalable, not maximum
09:18If I head back over there and show you, in the Target Hardware, we set it to mobile, and this quality, we set it to scalable
09:29 If you set it to maximum, it will automatically enable all the rendering features to max
09:34But if you set it to scalable, depending on the platform you select, some features are disabled by default, although they can be enabled based on your needs
09:42The actual hardware, so it is always recommended to set this to scalable, and then you can manually enable or disable the features that you need for your Android device
09:54All right, so for supported platforms, I will just untick the ones I don't need and enable Android and Windows
10:01Target hardware is set to this
10:04Now, what we need is to set this map for Android, for building and packaging it for Android
10:11So, go to Project Settings again, and if you scroll down, you will find 'Maps & Modes.' By default, it has been set to the third-person map, which is what we need
10:25Also, go to 'All Settings' and search for 'list of maps,' and you will find 'List of maps to include in the packaged build.' So, click on this plus icon, and then over here, you need to select..
10:41The .umap file, or the actual map of this third-person map, is inside this folder
10:47So, go to the Third Person Maps and select a map, so it will explicitly include this
10:53It will just include this map for the package
10:55All right, after this is done, now we need to set the Android SDK location, NDK location, and JDK location inside the project settings
11:08Now, scroll down over here; you will find the Platforms
11:11Go to Android, and you'll see that the APK packaging is now not configured, so click on Configure now
11:22Over here, the package build name—you can put your package name, such as com.example.sync or dpp, or anything you want, but make sure that you follow this naming convention
11:34All right, so the minimum SDK you can set to 26, but the target SDK is also important
11:46So here's the twist: we know that for 5.5, we need the SDK set to 34, but what happens is the NDK doesn't find the 34 target SDK
11:57Instead of 34, the NDK version 25.1 that we install doesn't find the target SDK 34
12:05So, hence, we are going to use SDK 33 here, but keep in mind, we have not installed 33 yet
12:13To do that, go to Android Studio and open it up again
12:17Again, go to the SDK Manager
12:22You will find that 33 is not installed; the only things installed are 34 and 35 by default, and 26 is there as well
12:32But you'll find that 33 is not installed here
12:37Nothing related to that is installed
12:42So, over here, we are just going to add SDK 33, with a minimum SDK version of 26
12:47Scroll down, and you will also find the Google Play services
12:49You need to configure that, and yep, that is it over here
12:51Now, on..
12:55On the left-hand side, go to Android SDK setup over here
12:57You need to actually set the location, so the location you just go back over here in Android Studio's SDK manager, copy this location, CTRL+C to copy it, and then right here, paste it
13:11You can just open this up as well, and you can paste it right over here
13:17If you go to Android SDK, this is the location that we need for the SDK
13:25All right, for the NDK, we're going to paste this again
13:29Inside this Android SDK, you will find the NDK folder
13:32Now, open this NDK folder and go inside this subfolder, 25.1
13:36Click on this and select, oops, let me try again
13:38So, select the NDK folder and click OK
13:43Let me check, and yes, the NDK is set
13:50Now, for the JDK, just remember where you have installed the JDK
13:59The C program files Java, search over here, and JDK 17, go inside this folder and click on select folder just like that
14:10Now, over here in the SDK API level, you need to set it to Android 33, and the NDK API level also needs to be set to Android 33
14:17That's it
14:25After this is done, I don't think you need to make any more changes
14:32There are some graphical settings you can adjust, but for now, I will keep them at default
14:38Over here, go to All Settings, and here's the project name that you can set, so I just set it to TPP Android
14:47All right, and here you can set the version of your APK
14:53Okay, I'm going to close this now
14:56To build it for Android, click on this platform
15:01First, you need to select "Refresh Platform Status," then click on it
15:04After it is done, you can proceed with the build
15:10Querying, go to Android and make sure you select the Shipping build so that the actual size of the APK will be reduced
15:16So, click on Shipping, and I'm going to select Android ASC format, then click on Package Project
15:25You will find over here that it is installed
15:27Okay, click on Package Project
15:31Inside my project folder, I'm going to create a new folder called "Build." So, I'm just going to open this Build folder; it was already there
15:41I'm just going to click on this Build folder and then click on Select Folder
15:47Now, it is going to take a lot of time because it will cook all the elements in this project
15:54It will cook them first and then it is going to package them for Android, so it's going to take a while
16:02It will also compile all the shaders as well
16:05Respect to the Shader Model for Android, right? So once you hear that beautiful sound, you will know that your build is successful
16:13You can check that in your output log, confirming the build was successful
16:19It took me around 17 minutes to build, and it has been saved right over here inside this build folder, with this package name
16:29Alright, so I'll open up the build right over here, and you will find that we have the APK over here
16:38You'll see there are multiple APKs, and we also have the OBB file, which is actually the data file
16:47What you can do is include the data file inside the APK
16:50For that, you can go to Project Settings, then go to Android under the Platform section, and you will find the option to package the game data inside the APK
16:58Just click on this
17:05Also, one thing that you could do is that sometimes some projects will need storage permissions in Android
17:12To actually get those storage permissions, you can set it in the Manifest file directly
17:19However, we have permissions inside the project settings, so just search for permissions here
17:30Currently, there are no permissions, so click on this plus sign, and I'm going to add these permissions
17:38First, Android.permission.WRITE_EXTERNAL_STORAGE, and the other is Android.permission.READ_EXTERNAL_STORAGE
17:41After this is done, now I'm going to hit refresh and then package the project again
17:46This time, it is not going to take 17 minutes to..
18:08I'm just going to delete everything from here, so let me just hit Shift + Delete
18:14This time, I'm going to create a new folder over here, just going to write "Android Build," and then click
18:23It will start, and it's going to take around 1 to 2 minutes to build successfully
18:30Yeah, this is the sound that I was talking about
18:42You'll find that the build is successful, and it has been saved right over here
18:53Let's head over to this folder
18:55Inside the Android build now, you will find that there is no OBB file; we just have an APK right over here
19:03What you have to do is click on the "Android Shipping ARM64." Just connect your Android device, make sure USB debugging is turned on
19:13After that, I'm just going to click on this
19:16It will install, and it's going to take a few seconds to install the APK on my Android device
19:27After the APK has been installed successfully, I'm just going to use this scrcpy app, which is open source software you can find on GitHub
19:38This software enables you to screen share the mobile screen on the Windows platform
19:44So, as you can see, I'm just going to open up the app drawer, and you'll find the Android TPP app right over here
19:51Once this is open, let me just close this and open it again, and there you go
19:58It is now in landscape mode
20:05Now, you will find you have the two controls right over here to control the camera and this one over here to control the movement of this character
20:11So, how amazingly it is working, and these controls have..
20:16The configuration has already been set up by this template; Unreal Engine has already configured these controls for mobile
20:23Currently, it is in scalable mode, but you can set it to maximum mode for higher fidelity
20:28As you can see, it is currently set to low graphics
20:34You can experiment with this third-person template or use other maps; however, you will need to optimize those maps for Android
20:42This is how you can set up the Android platform in Unreal Engine 5.5, package your Unreal project, and run it on your Android device
20:53Let me know what other tutorials you'd like me to create
20:59The next tutorial I will create is for the Game Animation Sample project in Unreal Engine 5.5, and I will port it to Android as an APK
21:06Interesting, so stay tuned for more
21:07Peace.