Android support on Unreal 5.0.3

Turnkey seems not to be included in Unreal 5 to enable android packaging (latest android studio, sdk, ndk, java). Whats up with this?

edit: why does not the engine run all the initializations itself, even the documentation is not correct (not being updated) to function. no mention or automated self-install of .net packages.

I guess you forgot to give the key after you sold the house. pun heavily intended, devs. the key became the not-turnkey solution, complexity became your downfall.

engine is nice and all, but if the packaging, delivery and install is not working simply then woe to you. k.i.s.s. always, wysiwyg, simplicity pays off, complexity in wrong place makes you need to sell products to fix those complexities, like self-breaking lamps to increase demand.

edit 2:
after installing .net 3.1 core, running the script:
C:\Program Files\Epic Games\UE_5.0\Engine\Build\BatchFiles>RunUAT.bat

gives:
“Running AutomationTool…
Parsing command line:
ERROR: Error: Failed to find scripts to execute in the command line params.
Updating environment variables set by a Turnkey sub-process
The system cannot find the path specified.
The system cannot find the file specified.”

edit3: after fixing something colliding with:
C:\Program Files\Epic Games\UE_5.0\Engine\Extras\Android>SetupAndroid.bat

gives:
“Android Studio Path: C:\Program Files\Android\Android Studio
Android Studio SDK Path: C:\Users\myuser\AppData\Local\Android\Sdk
Using sdkmanager: C:\Users\myuser\AppData\Local\Android\Sdk\tools\bin\sdkmanager.bat
Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
… 5 more
Update failed. Please check the Android Studio install.”

1 Like

you need
JRE8
JDK8
NDK21
SDK29/30

Its not finding java classes
so you either don’t have the jre or the jdk installed.
Gradle requires the JRE to fire up and then it needs the jdk for the classes and symbols

why not the latest java 18.

already have the latest java, sdk, ndk.
bro make the latest stuff work, not old stuff only.

personal note: jdk contains the jre.

edit: if exiftool.exe is on the path, it says: “\exiftool-12.44 was unexpected at this time.”

Hm.
I dev for Quest 2 which is android.
JRE 8. from the oracle archives.
That’s what Unreal Gradle uses, it holds the jvm to run the java tools in
JDK 8. Not latest
this contains the classes and debug sybols, gradle works with 8 not latest
its what unreal gradle works with that matters.
the ndk and sdk might be different if you are making a mobile game for new phone not quest
for quest apps its NDk21b and sdk 29 or 30

the jdk does not contain the jre in version 8.
Unreal gradle is what runs and does the compiling it was made for 8

unreal also specifically states to use Android studio 4 not the latest
That’s what its build chain was designed on for android
it won’t properly go with the latest things because the tools were designed using android studio 4 jdk 8 and running in the jre 8 env.

2 Likes

Thank you for the detailed explanation!
I had a similar issue and spent a whole day trying to figure out how to set up all the components for project packaging.
I wish the official documentation was as thorough as the community contributions on these forums. For one it doesn’t even touch upon the required version of Java SE. Amazing… are you supposed to figure it out yourself?

I know.
I don’t use unity much, but they dl and setup everything for you if you want to build android,
in UE you have to really want to do it badly because its a slog
I literally failed daily for 2 weeks
When I finally nailed it down it was 3 solid days.
now I can do it in an hour from scratch but I installed some parts several times
I think it could use much better official dox

one extra thing, how do you change ‘android:debuggable=“true”’ to “false”
from the ue5 settings, there is no separate toggle for that, and when adding
that ‘android:debuggable=“false”’ to the extra tags for node,
you get warning for duplicate settings, and you should not manually change
the androidmanifest.xml anyways, not being used.

edit: I guess the output selection (shipping) for the android project does not affect.

edit: platform menu setting does not affect the build, but the packaging settings.