ue5 not letting me package for quest 2 (android sdk)

UATHelper: Packaging (Android (ASTC)): WARNING: The SDK API requested ‘android-32’ not installed in C:/Users/USER/AppData/Local/Android/Sdk/platforms/android-29/platforms; Gradle will attempt to download it.
UATHelper: Packaging (Android (ASTC)): Building Java with SDK API level ‘android-32’
UATHelper: Packaging (Android (ASTC)): ERROR: System.IO.DirectoryNotFoundException: Could not find a part of the path ‘C:\Users*USER*\AppData\Local\Android\Sdk\platforms\android-29\build-tools’.

That’s the error I’m getting, now if you look at the folder structure in that error, it’s trying to find platforms inside the android 29 folder, thing is it’s already IN platforms folder, just a level higher, so that suggests to me, it wants to be pointed purely to the SDK folder so it can add \platforms\ and be happy.

It’s the same thing with the second error, \build-tools\ is in the \SDK\ folder. Not \SDK\android-29\build-tools, it’s \SDK\build-tools\

When I do that though, pointing it to purely \SDK, it pops an error about not having the SDK installed. It’s catch 22.

Help please!

1 Like

Since I’m working on the assumption it just wants to be pointed at appdata\local\android\sdk, I need to fix the “sdk not installed” error.

I’m guessing it’s failing at registering it with UE5 when I run “setupandroid.bat” although it says it is successful on running the bat.
Even though it says it’s successful on running the .bat, the package menu doesn’t update!

here’s what it looks like:

EDIT:
I’ve tried everything I can find with my google-fu:
android studio to 4.0,
java to 8,
latest android sdk + ndk,
user variables set correctly, copied into system variables too incase,
repository.cfg placed correctly,
licenses accepted through sdkmanager.bat --licenses in the powershell,
setupandroid.bat runs perfectly,
still no installed or auto sdk entry in sdk management under package for android, and it fails on packaging with this error:

block quote
LogTurnkeySupport: Running Turnkey device detection: ’ -ScriptsForProject=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/vix_sun_temple_ue5.uproject” Turnkey -utf8output -WaitForUATMutex -command=VerifySdk -ReportFilename=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/Intermediate/TurnkeyReport_1.log” -log=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/Intermediate/TurnkeyLog_1.log” -project=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/vix_sun_temple_ue5.uproject” -Device=Win64@DESKTOP-KGHJCS9’
LogMonitoredProcess: Running Serialized UAT: [ cmd.exe /c ““C:/Program Files/Epic Games/UE_5.0/Engine/Build/BatchFiles/RunUAT.bat” -ScriptsForProject=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/vix_sun_temple_ue5.uproject” Turnkey -utf8output -WaitForUATMutex -command=VerifySdk -ReportFilename=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/Intermediate/TurnkeyReport_1.log” -log=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/Intermediate/TurnkeyLog_1.log” -project=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/vix_sun_temple_ue5.uproject” -Device=Win64@D
ESKTOP-KGHJCS9” -nocompile ]
LogTurnkeySupport: Completed device detection: Code = 0
LogTurnkeySupport: Turnkey Device: Win64@DESKTOP-KGHJCS9: (Name=DESKTOP-KGHJCS9, Status=Valid, Installed=10.0.19044.0, MinAllowed=10.0.18362.0, MaxAllowed=, Flags=“Device_InstallSoftwareValid”)
LogSlate: Window ‘SDK Not Setup’ being destroyed
LogUObjectHash: Compacting FUObjectHashTables data took 0.67ms
LogTurnkeySupport: Project requires temp target (OculusVR plugin is enabled)
LogLauncherProfile: Unable to use promoted target - …/…/…/…/…/…/Users/victo/Documents/Unreal Projects/SunTemple 5.0/Binaries/Android/UnrealGame.target does not exist.
LogMonitoredProcess: Running Serialized UAT: [ cmd.exe /c ““C:/Program Files/Epic Games/UE_5.0/Engine/Build/BatchFiles/RunUAT.bat” -ScriptsForProject=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/vix_sun_temple_ue5.uproject” Turnkey -command=VerifySdk -platform=Android -UpdateIfNeeded -EditorIO -EditorIOPort=54174 -project=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/vix_sun_temple_ue5.uproject” BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook -project=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/vix_sun_temple_ue5.uproject” -unrealexe=”
C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" -platform=Android -cookflavor=ASTC -ddc=InstalledDerivedDataBackendGraph -installed -stage -archive -package -build -iostore -pak -prereqs -archivedirectory=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/Build” -CrashReporter -clientconfig=Development" -nocompile ]
UATHelper: Packaging (Android (ASTC)): Running AutomationTool…
UATHelper: Packaging (Android (ASTC)): Parsing command line: -ScriptsForProject=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/vix_sun_temple_ue5.uproject” Turnkey -command=VerifySdk -platform=Android -UpdateIfNeeded -EditorIO -EditorIOPort=54174 -project=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/vix_sun_temple_ue5.uproject” BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook -project=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/vix_sun_temple_ue5.uproject” -unrealexe=“C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\Win64\UnrealEditor-Cmd
.exe” -platform=Android -cookflavor=ASTC -ddc=InstalledDerivedDataBackendGraph -installed -stage -archive -package -build -iostore -pak -prereqs -archivedirectory=“C:/Users/victo/Documents/Unreal Projects/SunTemple 5.0/Build” -CrashReporter -clientconfig=Development -nocompile
UATHelper: Packaging (Android (ASTC)): Log location: C:\Users\victo\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.0\Log.txt
UATHelper: Packaging (Android (ASTC)): Installed Sdk validity:
UATHelper: Packaging (Android (ASTC)): Android: (Status=Invalid, Installed=, AutoSDK=, MinAllowed=r21a, MaxAllowed=r23a, Flags=“Platform_ValidHostPrerequisites”)
UATHelper: Packaging (Android (ASTC)): Will install Android SDK r21b
UATHelper: Packaging (Android (ASTC)): ----------------------------------------------
UATHelper: Packaging (Android (ASTC)): Running ‘C:\Program Files\Epic Games\UE_5.0\Engine/Extras/Android/SetupAndroid.bat android-28 28.0.3 3.10.2.4988404 21.4.7075529 -noninteractive’
UATHelper: Packaging (Android (ASTC)): ----------------------------------------------
UATHelper: Packaging (Android (ASTC)): Scanning for envvar changes…
UATHelper: Packaging (Android (ASTC)): … done!
UATHelper: Packaging (Android (ASTC)): ----------------------------------------------
UATHelper: Packaging (Android (ASTC)): Finished with 0
UATHelper: Packaging (Android (ASTC)): ----------------------------------------------
UATHelper: Packaging (Android (ASTC)): Scanning for envvar changes…
UATHelper: Packaging (Android (ASTC)): … done!
UATHelper: Packaging (Android (ASTC)): Cleaning Temp Paths…
UATHelper: Packaging (Android (ASTC)): BUILD SUCCESSFUL
UATHelper: Packaging (Android (ASTC)): Setting up ProjectParams for C:\Users\victo\Documents\Unreal Projects\SunTemple 5.0\vix_sun_temple_ue5.uproject
UATHelper: Packaging (Android (ASTC)): vix_sun_temple_ue5.uproject requires a temporary target.cs to be generated (OculusVR plugin is enabled)
UATHelper: Packaging (Android (ASTC)): ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Android (ASTC)): Running: C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe vix_sun_temple_ue5 Android Development -Project=“C:\Users\victo\Documents\Unreal Projects\SunTemple 5.0\vix_sun_temple_ue5.uproject” “C:\Users\victo\Documents\Unreal Projects\SunTemple 5.0\vix_sun_temple_ue5.uproject” -NoUBTMakefiles -remoteini=“C:\Users\victo\Documents\Unreal Projects\SunTemple 5.0” -skipdeploy -Manifest=“C:\Users\victo\Documents\Unreal Projects\SunTemple 5.0\Intermediate\Build\Manifest.xml” -NoHotReload -log=“C:\Users\victo\AppData\R
oaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.0\UBT-vix_sun_temple_ue5-Android-Development.txt”
UATHelper: Packaging (Android (ASTC)): Log file: C:\Users\victo\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.0\UBT-vix_sun_temple_ue5-Android-Development.txt
UATHelper: Packaging (Android (ASTC)): Note: Android toolchain NDK r21b recommended
UATHelper: Packaging (Android (ASTC)): ERROR: Platform Android is not a valid platform to build. Check that the SDK is installed properly.
PackagingResults: Error: Platform Android is not a valid platform to build. Check that the SDK is installed properly.
UATHelper: Packaging (Android (ASTC)): Took 1.8113678s to run UnrealBuildTool.exe, ExitCode=6
UATHelper: Packaging (Android (ASTC)): UnrealBuildTool failed. See log for more details. (C:\Users\victo\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.0\UBT-vix_sun_temple_ue5-Android-Development.txt)
UATHelper: Packaging (Android (ASTC)): AutomationTool executed for 0h 0m 31s
UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=6 (6)
UATHelper: Packaging (Android (ASTC)): Updating environment variables set by a Turnkey sub-process
UATHelper: Packaging (Android (ASTC)): The system cannot find the path specified.
UATHelper: Packaging (Android (ASTC)): The system cannot find the path specified.

It does say allowed versions: r21a through r23a up there on that image i posted, I tried android-23 too, no luck either!

1 Like

alright I got it working in UE5 but the way I went about it, I went back to unreal engine 4.27 and worked through it’s different errors but I tried something different, I deleted the custom paths for SDK and NDK (left JDK at it’s version 8 path), since I have them paths set in system and user variables and they are the default position on C drive. This didn’t work in 4.27 but it did get me to a different error, a “gradle” error further down the packaging process! So I tried the no custom path thing in UE5 and it finished packaging!

Other things that may have helped, apparently you need sdk,ndk,jdk and the commandline tools/build tools from android studio all to be a version that works with each other, so I downgraded to version 30 of sdk so the NDK could work with it, jdk 8 ofc.

The error in 4.27 is bugging me but flip it I’m taking the win, ue5 works now.

2 Likes

After hours of fiddling around I managed to get it working for UE 5.2.1 using these settings:
==Android==
Min SDK : 29
Target SDK : 32
==Android SDK==
C:/Users/win/AppData/Local/Android/Sdk
C:/Users/win/AppData/Local/Android/Sdk/ndk/25.1.8937393
C:/Program Files/Android/Android Studio/jre
android-32
android-29

====Android Studio====
==SDK Platforms==
Android 10.0+ (API Level 30)
Android 8.0
==SDK Tools== (make sure to select ‘Show Package details’ at the bottom)
Android SDK : 30.0.3
NDK : 25.1
Android SDK cmd-line tools: 10.0 and 8.0 (120.o might be sufficient tho)

Hope this helps someone.

5 Likes

Thank you so much! I have spent so many hours trying to solve this! Nice one!

You are an absolute mad lad! this saved my bacon!

1 Like

Kind Sir would you mind Sharing your Envionment Variables as well and locations :slight_smile: Thank you in advance. I been getting a error stating this.



@Gamingman93 I don’t think it has anything to do with the env. vars. It seems to me the process is looking for build tools which aren’t installed.
Check the […]\AppData\Local\Android\Sdk\build-tools folder to see which are installed and use Android Studio to install the missing one.
Under SDK manager | Android SDK | SDK Tools | Android SDK Build-Tools… and check the box Show package details on the bottom-right to see all.

Please note: somehow I have 2 Android SDK folders, one in the AppData folder and one in NVPACK. Make sure you are installing in the right folder or reference the right folder in your Project Settings

hi guys, just want to give an update on ue5.4 packaging here, making a post so i can remember the location, I had my project packaging for android 29 min 29 max 32, play store is saying the min now should be 33, i had the project packaged for min32 and min33, somehow without changing anything i assume it was just installing the appropriate tools like it should because it was working, well if your wondering up to 33 this works after 33 you get an error please update api to 33 inappropriate build tools, i had 2 simple errors to fix and somehow ■■■■■■ my ■■■■ up and if i had 1 image of the environment variables and 1 of each 3 different problem platform settings areas, would have saved me 4 weeks so this is for me to find the location so i can update this, oh and to the guy with the c:/NVPAK directory for your environment variables does that work? pretty sure should be c:/users/(urprofilename)/AppData/Android/sdk right?