Android Package Build Fails

I have been creating packages for quite sometime but now I am getting a failure on the build of the package which I can’t figure out. Any idea how to do as it suggests and run the build with scan or if you have a suggestion as to why it might fail on this “Task :permission_library:parseDebugLibraryResources FAILED”

ATHelper: Packaging (Android (ETC2)):

Task :permission_library:stripDebugDebugSymbols
UP-TO-DATE UATHelper: Packaging
(Android (ETC2)): > Task
:permission_library:transformNativeLibsWithIntermediateJniLibsForDebug
UP-TO-DATE UATHelper: Packaging
(Android (ETC2)): > Task
:permission_library:parseDebugLibraryResources
FAILED UATHelper: Packaging (Android
(ETC2)): UATHelper: Packaging
(Android (ETC2)): FAILURE: Build
failed with an exception. UATHelper:
Packaging (Android (ETC2)): 49
actionable tasks: 1 executed, 48
up-to-date UATHelper: Packaging
(Android (ETC2)): UATHelper:
Packaging (Android (ETC2)): * What
went wrong: UATHelper: Packaging
(Android (ETC2)): Execution failed
for task
‘:permission_library:parseDebugLibraryResources’.
UATHelper: Packaging (Android (ETC2)):
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
UATHelper: Packaging (Android (ETC2)):
!directory.isDirectory() UATHelper: Packaging (Android (ETC2)):
UATHelper: Packaging (Android (ETC2)):

  • Try: UATHelper: Packaging (Android (ETC2)): Run with --stacktrace
    option to get the stack trace. Run
    with --info or --debug option to get
    more log output. Run with --scan to
    get full insights. UATHelper:
    Packaging (Android (ETC2)):
    UATHelper: Packaging (Android (ETC2)):
  • Get more help at https://help.gradle.org UATHelper:
    Packaging (Android (ETC2)):
    UATHelper: Packaging (Android (ETC2)):
    BUILD FAILED in 29s UATHelper:
    Packaging (Android (ETC2)): ERROR:
    cmd.exe failed with args /c
    “D:\UE4\projects\PlaybookCallerPFF
    4.25\Intermediate\Android\armv7\gradle\rungradle.bat”
    :app:assembleDebug PackagingResults:
    Error: cmd.exe failed with args /c
    “D:\UE4\projects\PlaybookCallerPFF
    4.25\Intermediate\Android\armv7\gradle\rungradle.bat”
    :app:assembleDebug UATHelper:
    Packaging (Android (ETC2)): Took
    34.4709071s to run UnrealBuildTool.exe, ExitCode=6
    UATHelper: Packaging (Android (ETC2)):
    UnrealBuildTool failed. See log for
    more details.
    (C:\Users\YummyV\AppData\Roaming\Unreal
    Engine\AutomationTool\Logs\D+UE4+UE_4.25\UBT-PlaybookCallerPFF-Android-Shipping.txt)
    UATHelper: Packaging (Android (ETC2)):
    AutomationTool exiting with ExitCode=6
    (6) UATHelper: Packaging (Android
    (ETC2)): BUILD FAILED

Very late to the party, but in case anyone else bumps into this. This kind of incomprehensible error during gradle run is usually down to java version. Probably you are using too new a version of java.

I know that Microsoft\jdk-11.0.17.8-hotspot works at time of writing (UE5.2) and that \Microsoft\jdk-17.0.7.7-hotspot does not work.

gradle will first look for java in your JAVA_HOME env variable, and then your path. Probably in this case you installed (maybe without even knowing…) a new version of java that changed that env variable and borked your builds. Fun!