What is wrong with my Android build?

I`ve spent the whole day to install SDK, NDK & JRE properly. Now i ran into some Problems and I installed .NET Frameworks but still there are errors I cant resolve.
The following is the console output:

UATHelper: Packaging (Android (Multi:ETC2)): Running AutomationTool…
UATHelper: Packaging (Android (Multi:ETC2)): Parsing command line: -ScriptsForProject=C:/Users/julia/Desktop/IMPORT/Unreal/MyProject3/MyProject3.uproject Turnkey -command=VerifySdk -platform=Android -UpdateIfNeeded -EditorIO -EditorIOPort=49988 -project=C:/Users/julia/Desktop/IMPORT/Unreal/MyProject3/MyProject3.uproject BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook -project=C:/Users/julia/Desktop/IMPORT/Unreal/MyProject3/MyProject3.uproject -unrealexe=“C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\Win64\UnrealEditor-Cmd.exe” -platform=Android -cookflavor=Multi -dd
c=InstalledDerivedDataBackendGraph -installed -stage -archive -package -build -compressed -iostore -pak -archivedirectory=C:/Users/julia/Desktop/EXPORT -nocompile
UATHelper: Packaging (Android (Multi:ETC2)): WARNING: Error while enumerating Visual Studio toolchains
UATHelper: Packaging (Android (Multi:ETC2)): WARNING: Assuming no compilation capability for NET Framework projects.
PackagingResults: Warning: Error while enumerating Visual Studio toolchains
PackagingResults: Warning: Assuming no compilation capability for NET Framework projects.
UATHelper: Packaging (Android (Multi:ETC2)): Log location: C:\Users\julia\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.0\Log.txt
UATHelper: Packaging (Android (Multi:ETC2)): Installed Sdk validity:
UATHelper: Packaging (Android (Multi:ETC2)): Android: (Status=Valid, Installed=r21b, AutoSDK=, MinAllowed=r21a, MaxAllowed=r23a, Flags=“InstalledSdk_ValidVersionExists”)
UATHelper: Packaging (Android (Multi:ETC2)): Scanning for envvar changes…
UATHelper: Packaging (Android (Multi:ETC2)): … done!
UATHelper: Packaging (Android (Multi:ETC2)): Cleaning Temp Paths…
UATHelper: Packaging (Android (Multi:ETC2)): BUILD SUCCESSFUL
UATHelper: Packaging (Android (Multi:ETC2)): Setting up ProjectParams for C:\Users\julia\Desktop\IMPORT\Unreal\MyProject3\MyProject3.uproject
UATHelper: Packaging (Android (Multi:ETC2)): MyProject3.uproject requires a temporary target.cs to be generated (ChaosVehiclesPlugin plugin is enabled)
UATHelper: Packaging (Android (Multi:ETC2)): ERROR: C:\Users\julia\Desktop\IMPORT\Unreal\MyProject3\MyProject3.uproject does not look like uproject file but no targets have been found!
UATHelper: Packaging (Android (Multi:ETC2)): (see C:\Users\julia\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.0\Log.txt for full exception trace)
PackagingResults: Error: C:\Users\julia\Desktop\IMPORT\Unreal\MyProject3\MyProject3.uproject does not look like uproject file but no targets have been found!
UATHelper: Packaging (Android (Multi:ETC2)): AutomationTool executed for 0h 0m 1s
UATHelper: Packaging (Android (Multi:ETC2)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (Multi:ETC2)): Updating environment variables set by a Turnkey sub-process
UATHelper: Packaging (Android (Multi:ETC2)): Das System kann den angegebenen Pfad nicht finden.
UATHelper: Packaging (Android (Multi:ETC2)): Das System kann den angegebenen Pfad nicht finden.

Im new to Unreal and I hope someone can help me in time, if not I have to go back to Unity ^^

Best reguards!

Have you installed Visual Studio?

1 Like

Thank you!!!

I solved a ton of additional problems and now I ran into an error with the java system variable which is set correctly but i tells me the opposite. Can you help me further?

grafik

It could be that you have one system JAVA_HOME variable and one user JAVA_HOME variable.
If you go to your windows settings for your enviroment variables, you will find 2 places to edit them, one for the current user and one for the system.
Another way to check is, If you type Get-Childitem -path env: in powershell, you will find a union of those values and see which the effective value is.
It seems that unreal is reporting the effective value, but your JAVA_HOME screenshot shows your entry that is overruled by another one. So check where you have set JAVA_HOME (user trumps system) or if you might have multiple settings.

did you try putting the full path in the project settings?
you might have it blank

1 Like

Thank you, I have done it but:

What went wrong:
UATHelper: Packaging (Android (ETC2)): Execution failed for task ‘:downloader_library:compileDebugJavaWithJavac’.
UATHelper: Packaging (Android (ETC2)): > Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_291 contains a valid JDK installation.

red error:
UATHelper: Packaging (Android (ETC2)): ERROR: cmd.exe failed with args /c “C:\Users\julia\Desktop\IMPORT\Unreal\MyProject3\Intermediate\Android\gradle\rungradle.bat” :app:bundleDebug

Unreals export is horrible, I solved the last problem: "make sure there is a working JRE with a correspingJDK " by copying the JDK right into the JRE

Now there is an AAPT error which i cant fix:

And as you see, I still have the cmd error :smiling_face_with_tear:

Pls help me :star_struck:

you can’t put the jdk over the jre
they are both separately necessary and should be in their default positions
jdk8 has java dev headers you need to build for android
android studio 4 has commandline tools needed
both require the JRE8 to be running as the JRE creates the java virtual machine that the tools run inside while they build, gradle requires the jre to begin and run!
uninstall the jre and jdk and reinstall them in their default locations is really the best option since you are having problems with your paths

the resource linking is telling you that you’ve mangled the jdk files, and the gradle error is telling you it can’t load gradle into the jre
and if you don’t have android 4, ndk, sdk installed gradle will fail but this error is telling you it can’t even run

1 Like

Thx I now have a clean install of the jre#

Here my directories & error reports:
grafik


in androidstudio 4
add the sdk using the sdk manager
I use android SDK build tools 23
you have “matchndk” install 23 and put 23 there or alternatively install the sdk to “match” the ndk
I suggest sdk23 tho
I use ndk 21
sdk cmd line tools latest 6 or 7
I use sdk platform 6 marshmallow

this is a good tutorial

don’t get frustrated, it took me 3 weeks to get it right

okay, for me its day 2 and I already did it before u sent me this tutorial advice but i cant accept the sdk license agreement in Unreal, bec the sdk folder is locked and i cant unlock it, I tried many properties & commands but every time when I look at properties it is locked again. ):

I copied it out of the andorid folder to unlock it but it seems impossible…

locked sdk agreement:

grafik

Nothing works, any idea how I could accept it manually?

grafik

as you see I was able to acccept via cmd line

Now Im trying multiple JRE versions, each throws another exception, which one do you use?

8u331

8u341

8u301

8u202

8u341 & fresh JDK installation (outside jre/inside jre)

I think its time to give up…
okay can anyone help me?

I don’t have a moment to look closer and german is slow for me
but your jdk dir is still pointing to the jre dir
just so you know
as long as you have android 4 (NOT the latest)
you can actually put the sdk, ndk, jdk wherever if you know how to set their paths
they are self contained folders
the jre and android should be in default


its still looking for the jdk tools inside the jre which is wrong

Thank you for your time…

I use the latest android and now I put the jdk into the Android dir and linked it in unreal like that:

but i get errors:

any ideas?

take out match ndk and put the version number of your sdk in there
put 21 in the ndk field not latest

however

I don’t think that’s your problem
I think your problem is you have too long of paths for your project because you have it on a folder on your desktop
move your project to something like c:\projects so the paths will be shorter
the first red line is also telling you that the jre is trying to build a plugin called VMPluginfactory and that is failing
so disable it, or if you need it contact the dev for the plugin
but to build, try disabling that plugin for a build test to see.
I suggest you not try to debug android build on your actual project
you will have issues in figuring out whats wrong

make a clean blank 3rd person template project
set the android in that and build it
otherwise you might have it working but can’t tell because you have a project error.

1 Like

wait a sec.
Did you say you use the latest android
like android 2022?
NO.
Android 4.
The old version.
that’s what unreal uses and thats what a quest was built with and that’s the version every quest dev on unity uses as well.

just so you lknow
I was on 4.27 for the last 2 years and I just spent 5 hours myself setting up UE5 to build to quest. It was very trial and error and I failed several times until I got it all finally at 7 am
following this video
and he doesn’t mention but you have to have dotnet 3.1 installed which isn’t normally in windows.
Your frustration is normal, but its a good vid
and he has a patreon if you want to get more info from him

this is a ue5 tutorial

1 Like

It seems impossible, I reinstalled all, setup the JAVA_HOME variable but there is an error at 11:30 min in the video…

I tried:
Simply open PowerShell and run: New-Item ~.android\repositories.cfg -Force

now:
grafik

I editet the SetupAndroid and deletet all ndk & cmake stuff (installed the correct cmake version but didnt work) but I tink thats not the solution

I deleted in the “SetupAndroid” script:
“$SDKMANAGERPATH/sdkmanager” “platform-tools” “platforms;android-28” “build-tools;28.0.3” “cmake;some_version” “ndk;some_numbers”

now the download works but:

Hey @Goodgamejuli, you’ve got everything together it looks like and the last thing is accepting the license agreements. This is always unintuitive, and I apologize. So navigating to your SDK’s root then tools/bin you should be able to run the sdkmanager with the command

./sdkmanager --licenses

and it should allow you to accept the license agreements from there.

1 Like

I accepted all licences but the modified “SetupAndroid" script says I havnt. I cant use this script, bec it makes no sence, I need to fix the following before I can proceed instead:
grafik

I use Android SDK Platform 4.4 in Android Studio, is that a problem?

I downgraded to Andorid 4.0 but it was not necessary. I changed the version for cmake & ndk, in the “SetupAndroid" script, installed these newer versions in AndroidStudio & it worked!

I have done all steps in the video by editing the bat scripts and linking the right thinks together
but Unreal does not recognize the SDK, Why??


see if your firewall is blocking java and graddle. those need to go online to talk with some servers do some stuff. that pesky graddle especially, if he doesn’t go online to download custom packages for your project it will not work.

i’ve spent so many nights trying to have a local graddle installation when i was using unity. some say is possible, I’ve never figured this out

1 Like

I never touched the android bat script
the resource cfg you can create by going to the directory and right click make new text file rename it to repository.cfg
you don’t need to use powershell to do it
I used a tool in powershell thats in the unreal engine/engine/batch folder called by the command
,\RunUAT.bat Turnkey
that checked my sdk

he sets up 29 the puts 28 in the field
I activated android 9 and 10 to get sdk 28 and 29 and used 29
cmake you install inside sdk manager
the whole setup was finicky and time consuming but its working
what’s working for me right now

I have said to a few ppl
Unreal/Epic should make an sdk for the quest that installs everything
the old unreal had the compiler built in to the engine

but, its just one of those things we all have to grind through if we want to build for zuckie’s toy

I have a couple projects that are specifically quest
but I am gradually shifting to full pcvr for most of my other projects for the quality and ease.

I should add it was essential for me to install dotnet 3.1 on win10
nothing worked properly until I did

2 Likes