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.
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!
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:
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.
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)
@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?