I know this question has been taken up on the internet forums but none of them have a proper solution that works.
I have a game made for android for years but cannot even package it as an apk. Been trying to figure it out for weeks now !
This is the error that I keep getting : UATHelper: Packaging (Android (DXT)): ERROR: cmd.exe failed with args /c “C:\Users[PC NAME]\Documents\Unreal Projects\Teleport 4.24\Intermediate\Android\APK\gradle\rungradle.bat” :app:assembleDebug
Things I have tried (after searching solutions on internet)
Making Sure I accepted the SDK Liscence
Downloading and Installing Android-28 (as the compiler said it was needed and recommended, and sdk installed
has upto Android-26 api level only)
Making sure firewall or Antivirus is not blocking UE4
Changing apk name
Installing and running with ndk-16b and ndk-18b (newer versions)
Installing Gradle 4.6 (newer gradle version)
Deleting gradle cache file
Deleting the intermediate folder in project file and then compiling (it comes back with same error)
Please Note : Earlier when I did android development with UE4V18.1 , I still had problems with gradle so i used ‘ant’ instead. But now that ant has become obsolete, I don’t have that option.
Kindly help me, I can’t waste any more time on just packaging.
I solved it by deleting the directory under which it expected the aapt2 executable, e.g. “C:\Users\support.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\4c1f5b7dca1d5d378360be7f3fd9726a” and then i removed save and intermediate folders of my project. after that i connect my computer to the internet and and start building my project for android Afterwards it appears to have downloaded this again, with the missing executable, and now works perfectly.
gradle error is usually a symptom of another issue (usually a misconfiguration of the android SDK level relative to the engine)
For me, I followed the unreal documentation to install Android studio 4.0.0 (recently updated) this installed the SDK Build Tools 31, which are not supported with 4.26. I had to downgrade the build tools to v30 and reconfigure the SDK/NDK level in project settings to latest/android-19
Hi,
Unfortunately, following unreal documentation didn’t help me. It seems that step 3.3 that asked you to run the SetupAndroid.bat file installing the wrong version. So here is what I did to get around the gradle error.
Hi. Ive got exactly the same issue. The support for android development is appauling in Unreal. The documentation seems to not be revelant.
Ive tried removing all android installation using this method
And reinstalling.
When i install again the sdk is greyed out, my phone isnt recognised and the exclamation mark in the android packaging menu is present.
the problem with gradle and android development is very old . i don’t understand why there is no fix for it after all this time . this is a really important issue .
hello everyone I had the same problem in ue5.1 and I solved it.
make sure that you are using JDK 8u77 (1.8.0_302) also check that its JDK, not JRE
-make sure that you set JAVA_HOME and ANDROID_HOME
-make sure that you are using android studio 4.0
Use NDK 25.1.8937393 for unreal
-here are some images of my settings