[HELP] Android\arm64\gradle\rungradle.bat ERROR HELL

Hi. I have done so many research and google. But can’t solve this error yet.

I’m using 4.26 engine now. And my setting steps for Android packaging like below:

Install Android Studio - Latest Version
Install Java 8
Run Setup Android

SDKConfig :

Android SDK - C:/Users/xxx/AppData/Local/Android/Sdk
Android NDK - C:/Users/xxx/AppData/Local/Android/Sdk/ndk/21.4.7075529
JAVA - C:/Program Files/Java/jdk1.8.0_301
SDK API Level - latest
NDK API Level - latest

What I was packaging (Project Settings) is like below :

Package game data inside .apk - Enabled
Allow large OBB files - Enabled
Support arm64 - Enabled
Support OpenGL ES3.1 - Enabled
Support Vulkan - Enabled

What I have tried to solve it :

Delete Intermediate folder - Not working
Delete Only Intermediate/Android folder - Not working
Delete android-sdk-license - Not working
Run C://NVPACK something - No such things in 4.26 version up to.

Any other advice or helps ?

1 Like

I don’t yet have any advice, but I am very recently encountering gradle issues myself. I was fine with packaging until I reinstalled Andriod Studio recently, and now I am getting gradle issues that usually I had been able to resolve by deleting Intermediate, as you did.

The errors I am getting are bolded below:

UATHelper: Packaging (Android (ASTC)): ====7/22/2021 8:45:04 PM====PERFORMING FINAL APK PACKAGE OPERATION=====-armv7===========================================
UATHelper: Packaging (Android (ASTC)): Copying C:\Users\rober\Documents\Unreal Projects\TutorialProject\Intermediate\Android\armv7\AndroidManifest.xml to C:\Users\rober\Documents\Unreal Projects\TutorialProject\Intermediate\Android\armv7\gradle\app\src\main\AndroidManifest.xml
UATHelper: Packaging (Android (ASTC)): Fixing minSdkVersion; NDK level above 19 requires minSdkVersion of 21 (arch=armv7)
UATHelper: Packaging (Android (ASTC)): Creating rungradle.bat to work around commandline length limit (using unused drive letter X:)
UATHelper: Packaging (Android (ASTC)): Making .apk with Gradle…
UATHelper: Packaging (Android (ASTC)): To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: The Gradle Daemon.
UATHelper: Packaging (Android (ASTC)): Daemon will be stopped at the end of the build stopping after processing
UATHelper: Packaging (Android (ASTC)): Build-tool 31.0.0 is missing DX at C:\Users\rober\AppData\Local\Android\Sdk\build-tools\31.0.0\dx.bat
UATHelper: Packaging (Android (ASTC)): File C:\Users\rober.android\repositories.cfg could not be loaded.
UATHelper: Packaging (Android (ASTC)): Build-tool 31.0.0 is missing DX at C:\Users\rober\AppData\Local\Android\Sdk\build-tools\31.0.0\dx.bat
UATHelper: Packaging (Android (ASTC)): FAILURE: Build failed with an exception.
UATHelper: Packaging (Android (ASTC)): * What went wrong:
UATHelper: Packaging (Android (ASTC)): Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’.
UATHelper: Packaging (Android (ASTC)): > Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
UATHelper: Packaging (Android (ASTC)): * Try:
UATHelper: Packaging (Android (ASTC)): 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 (ASTC)): * Get more help at https://help.gradle.org
UATHelper: Packaging (Android (ASTC)): BUILD FAILED in 10s
UATHelper: Packaging (Android (ASTC)): ERROR: cmd.exe failed with args /c “C:\Users\rober\Documents\Unreal Projects\TutorialProject\Intermediate\Android\armv7\gradle\rungradle.bat” :app:assembleDebug
UATHelper: Packaging (Android (ASTC)): (see C:\Users\rober\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.26\Log.txt for full exception trace)
PackagingResults: Error: cmd.exe failed with args /c “C:\Users\rober\Documents\Unreal Projects\TutorialProject\Intermediate\Android\armv7\gradle\rungradle.bat” :app:assembleDebug
UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ASTC)): BUILD FAILED
PackagingResults: Error: Unknown Error

I have just done this little video, though it didn’t help.

But I will ask, are you also seeing the " ERROR “Installed Build Tools revision 31.0.0 is corrupted” in Android Studio" issue?

I will continue with this tomorrow…

1 Like

Ok, if you’re getting the “Installed Build Tools revision 31.0.0 is corrupted.” error, a simple fix is to:

  • go into Android Studio’s SDK Manager
  • go to SDK Tools
  • Select “Show package Details”
  • Unselect 31.0.0
  • Reboot

I’m now able to package APK’s again, without gradle errors.

19 Likes

This is perfect solution. Thanks

2 Likes


Getting same gradle error but haven’t Insatlled 31.0+ sdk anytime for shipping release version. Build working good for development version

{this is the full error.}

Running AutomationTool…
Parsing command line: -ScriptsForProject=“C:/Users/adila/OneDrive/Documents/Unreal Projects/finished/finished.uproject” BuildCookRun -project=“C:/Users/adila/OneDrive/Documents/Unreal Projects/finished/finished.uproject” -noP4 -clientconfig=Development -serverconfig=Development -nocompile -nocompileeditor -installed -ue4exe=“C:\Program Files\Epic Games\UE_4.26\Engine\Binaries\Win64\UE4Editor-Cmd.exe” -utf8output -platform=Android -targetplatform=Android -cookflavor=ASTC -ini:Game:[/Script/UnrealEd.ProjectPackagingSettings]:BlueprintNativizationMethod=Disabled -build -cookonthefly -nokill -map= -compressed -stage -deploy -cmdline=" -Messaging" -device=Android_ASTC@572c4ea7 -addcmdline="-SessionId=9A5F2DA14DC8ECBBCEF1F5B2BBB47578 -SessionOwner=‘adila’ -SessionName=‘POCO_F1 (572c4ea7)’ " -run
Setting up ProjectParams for C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\finished.uproject
finished.uproject requires a temporary target.cs to be generated (PythonScriptPlugin plugin is enabled)
********** BUILD COMMAND STARTED **********
Running: C:\Program Files\Epic Games\UE_4.26\Engine\Binaries\DotNET\UnrealBuildTool.exe finished Android Development -Project=“C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\finished.uproject” “C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\finished.uproject” -NoUBTMakefiles -remoteini=“C:\Users\adila\OneDrive\Documents\Unreal Projects\finished” -skipdeploy -ini:Game:[/Script/UnrealEd.ProjectPackagingSettings]:BlueprintNativizationMethod=Disabled -Manifest=“C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Intermediate\Build\Manifest.xml” -NoHotReload -log=“C:\Users\adila\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.26\UBT-finished-Android-Development.txt”
PLATFORM_ANDROID_NDK_VERSION = 210500
NDK toolchain: r21e, NDK version: 21, GccVersion: 4.9, ClangVersion: 9.0.9
Compiling Native 32-bit code with NDK API ‘android-21’
Writing manifest to C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Intermediate\Build\Manifest.xml
Target is up to date
Deploying finished Android Development…
AndroidPlugin: Plugins\Online\Android\OnlineSubsystemGooglePlay\Source\OnlineSubsystemGooglePlay_UPL.xml
AndroidPlugin: Plugins\Runtime\AndroidPermission\Source\AndroidPermission\AndroidPermission_APL.xml
AndroidPlugin: Plugins\Runtime\GoogleCloudMessaging\Source\GoogleCloudMessaging\GoogleCloudMessaging_UPL.xml
AndroidPlugin: Plugins\Runtime\GooglePAD\Source\GooglePAD\GooglePAD_APL.xml
AndroidPlugin: Plugins\Runtime\Oculus\OculusVR\Source\OculusHMD\OculusMobile_APL.xml
AndroidPlugin: Source\Runtime\Online\Voice\AndroidVoiceImpl_UPL.xml
AndroidPlugin: Source\ThirdParty\GoogleGameSDK\GoogleGameSDK_APL.xml
UPL: …\Plugins/Online/Android/OnlineSubsystemGooglePlay/Source/OnlineSubsystemGooglePlay_UPL.xml
UPL: …\Plugins/Runtime/AndroidPermission/Source/AndroidPermission/AndroidPermission_APL.xml
UPL: …\Plugins/Runtime/GoogleCloudMessaging/Source/GoogleCloudMessaging/GoogleCloudMessaging_UPL.xml
UPL: …\Plugins/Runtime/GooglePAD/Source/GooglePAD/GooglePAD_APL.xml
UPL: …\Plugins/Runtime/Oculus/OculusVR/Source/OculusHMD/OculusMobile_APL.xml
UPL: …\Source/Runtime/Online/Voice/AndroidVoiceImpl_UPL.xml
UPL: …\Source/ThirdParty/GoogleGameSDK/GoogleGameSDK_APL.xml
Using package name: ‘com.YourCompany.finished’
GotStoreVersion found v1. (bUseChangeListAsStoreVersion=False IsBuildMachine=False EngineChangeList=0)
Writing packageInfo pkgName:com.YourCompany.finished storeVersion:1 versionDisplayName:1.0 to C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Binaries\Android\packageInfo.txt

====7/28/2021 1:38:04 PM====PREPARING TO MAKE APK=================================================================
bBuildForES31: true
bSupportsVulkan: false
Building Java with SDK API level ‘android-31’
Building with Build Tools version ‘31.0.0’

==== Writing to shim file C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Build\Android\src\com\epicgames\ue4\DownloadShim.java ====

==== Shim data file up to date so not writing. ====

==== Writing to template target file C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Build\Android\src\com\YourCompany\finished\AlarmReceiver.java ====

==== Template target file up to date so not writing. ====

==== Writing to template target file C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Build\Android\src\com\YourCompany\finished\DownloaderActivity.java ====

==== Template target file up to date so not writing. ====

==== Writing to template target file C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Build\Android\src\com\YourCompany\finished\OBBDownloaderService.java ====

==== Template target file up to date so not writing. ====
Cleaning up files based on template dir C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Build\Android\src\com\YourCompany\finished
C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Binaries\Android\finished-armv7.apk is out of date due to newer input file C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Binaries\Android\finished-armv7.so
UPL Init: armeabi-v7a
Subsystem Google Play SDK Android init
Android Permission Plugin Init
Google Cloud Messaging init
GCMClientSenderID set: false
GooglePAD Plugin Init
GooglePAD enabled: false
Oculus mobile init
Oculus Signature Files (osig) will be removed from APK
Android Voice init
GoogleGameSDK Android init
On build machine.
Fixing minSdkVersion; NDK level above 19 requires minSdkVersion of 21 (arch=armv7)
Fixing minSdkVersion; NDK level above 19 requires minSdkVersion of 21 (arch=armv7)

====7/28/2021 1:38:05 PM====PREPARING NATIVE CODE=====-armv7============================================================
bPackageDataInsideApk = True
Obb location C:\Users\adila\OneDrive\Documents\Unreal Projects\finished/Saved/StagedBuilds/Android.obb
Obb destination location C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Intermediate\Android\armv7/assets
Added repository: …\Source\ThirdParty\Android\extras\google\m2repository
Added repository: …\Source\ThirdParty\Android\extras\android\m2repository
AARImports: com.google.android.gms, play-services-auth, 11.8.0
AARImports: com.google.android.gms, play-services-games, 11.8.0
AARImports: com.google.android.gms, play-services-nearby, 11.8.0
AARImports: com.google.android.gms, play-services-plus, 11.8.0
Copying Google Play BillingApiV2 java files

Directory …/Plugins/Online/Android/OnlineSubsystemGooglePlay/Source/Java/BillingApiV2 copied to C:/Users/adila/OneDrive/Documents/Unreal Projects/finished/Intermediate/Android/armv7/src
Copying permission_library directory to staging before build

Directory …//Source/ThirdParty/AndroidPermission/permission_library copied to C:/Users/adila/OneDrive/Documents/Unreal Projects/finished/Intermediate/Android/armv7/JavaLibs/permission_library

==== Writing to OBB data file C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Intermediate\Android\armv7\src\com\YourCompany\finished\OBBData.java ====

==== OBB data file up to date so not writing. ====
Copying libplaycore.so and proguard files

File C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Runtime/GooglePAD/Source/GooglePAD/…/ThirdParty/play-core-native-sdk/libs/armeabi-v7a/ndk21.4.7075529/c++_shared/libplaycore.so copied to C:/Users/adila/OneDrive/Documents/Unreal Projects/finished/Intermediate/Android/armv7/libs/armeabi-v7a/libplaycore.so
Copying libvrapi.so

File …//Source/ThirdParty/Oculus/OVRPlugin/OVRPlugin/ExtLibs/armeabi-v7a/libvrapi.so copied to C:/Users/adila/OneDrive/Documents/Unreal Projects/finished/Intermediate/Android/armv7/libs/armeabi-v7a/libvrapi.so
Copying libOVRPlugin.so

File …//Source/ThirdParty/Oculus/OVRPlugin/OVRPlugin/Lib/armeabi-v7a/libOVRPlugin.so copied to C:/Users/adila/OneDrive/Documents/Unreal Projects/finished/Intermediate/Android/armv7/libs/armeabi-v7a/libOVRPlugin.so

File …//Source/ThirdParty/Oculus/OVRPlugin/OVRPlugin/ExtLibs/VrApi.jar does not exist, not copied!

File …//Source/ThirdParty/Oculus/OVRPlugin/OVRPlugin/ExtLibs/SystemUtils.jar does not exist, not copied!

====7/28/2021 1:38:07 PM====PERFORMING FINAL APK PACKAGE OPERATION=====-armv7===========================================
Fixing minSdkVersion; NDK level above 19 requires minSdkVersion of 21 (arch=armv7)

Creating rungradle.bat to work around commandline length limit (using unused drive letter Z:)
Making .apk with Gradle…
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: The Gradle Daemon.
Daemon will be stopped at the end of the build stopping after processing
Build-tool 31.0.0 is missing DX at C:\AndroidSdkLocation\build-tools\31.0.0\dx.bat
File C:\Users\adila.android\repositories.cfg could not be loaded.
Build-tool 31.0.0 is missing DX at C:\AndroidSdkLocation\build-tools\31.0.0\dx.bat

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’.

Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.

  • Try:
    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.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 55s
ERROR: cmd.exe failed with args /c “C:\Users\adila\OneDrive\Documents\Unreal Projects\finished\Intermediate\Android\armv7\gradle\rungradle.bat” :app:assembleDebug
Took 139.7422175s to run UnrealBuildTool.exe, ExitCode=6
UnrealBuildTool failed. See log for more details. (C:\Users\adila\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.26\UBT-finished-Android-Development.txt)
AutomationTool exiting with ExitCode=6 (6)
BUILD FAILED

Build-tool 31.0.0 is missing DX at C:\AndroidSdkLocation\build-tools\31.0.0\dx.bat

can anybody help me plz

Just use 30 to apply Target SDK. It will be solved.

good luck

1 Like

Thanks @ooghe for help to solve this problem.

Another step I did is specify the SDK version to use as ‘android-30’, Minimum and Target SDK to ‘30’.
And it’s work =D

Here is screenshot of what I did:
image

On Android Studio, I uninstalled the sdk version 31:

7 Likes

this was answered by @user16475264 on Android Studio error "Installed Build Tools revision 31.0.0 is corrupted" - Stack Overflow

basically v31 has changed the name of dx.jar so either :
“-
mklink %ANDROID_HOME%\build-tools\31.0.0\dx.bat %ANDROID_HOME%\build-tools\31.0.0\d8.bat && mklink %ANDROID_HOME%\build-tools\31.0.0\lib\dx.jar %ANDROID_HOME%\build-tools\31.0.0\lib\d8.jar”

or rename d8.bat to dx.bat and d8.jar to dx.jar and v31 will work
until google / epic fix this issue… :wink:

also had to install the latest command line tools from android studio,

and edit:

line 81 and 85? of /Engine/Extras/Android/SeupAndroid.bat
@rem set SDKMANAGER=%STUDIO_SDK_PATH%\tools\bin\sdkmanager.bat
set SDKMANAGER=%STUDIO_SDK_PATH%\cmdline-tools\latest\bin\sdkmanager.bat
@anonymous_user_0606cc32 63-ish in 4.27

and run-> cmd: sdkmanager.bat --licenses
to accept all

Using UE5 early access 2
w/ Android studio v. 2020.3.0
jdk 1.8.0_301
gradle:
(unreal install directory)
“\Epic Games\UE_5.0EA\Engine\Build\Android\Java\gradle\gradle\wrapper\gradle-wrapper.properties” :file:

distributionUrl=https://services.gradle.org/distributions/gradle-6.1.1-all.zip

and in gradle.build :file:
dependencies {
classpath ‘com.android.tools.build:gradle:4.2.2’
}

using:

Android SDK: C:/Users/[username…]/AppData/Local/Android/Sdk/

Android NDK: C:/Users/[username…]/AppData/Local/Android/Sdk/ndk/21.0.6113669
(installed with ."\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\sdkmanager ndk;21.0.6113669" once installed from AndroidStudio.

JDK: E:/SdkInstallers/Java/jdk1.8.0_301 (path for jdk 8 install/JAVA_HOME )

SDK target version: android-17
NDK target version: android-21

min SDK : 17
max SDK : 31

able to build fine… but only for 64bit in EA5?
not sure if armeabi-v7a is no longer supported in EA5 and I don’t have any 64bit android devices to test on atm.

will try setting up UE4.27 next… still an Unreal n00b… but hope this may help someone

…also works in 4.27 just tested only difference was to this:

Android SDK: C:/Users/[username…]/AppData/Local/Android/Sdk ( must not have the end slash )

********** PACKAGE COMMAND COMPLETED **********
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ********** ARCHIVE COMMAND STARTED **********
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Archiving to E:/Unreal Projects/Deploy
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): GetPackageInfo ReturnValue: com.YourCompany.UE4
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): GetPackageInfo ReturnValue: 1
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): GetPackageInfo ReturnValue: com.YourCompany.UE4
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): GetPackageInfo ReturnValue: 1
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): GetPackageInfo ReturnValue: com.YourCompany.UE4
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): GetPackageInfo ReturnValue: 1
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): GetPackageInfo ReturnValue: com.YourCompany.UE4
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): GetPackageInfo ReturnValue: 1
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ********** ARCHIVE COMMAND COMPLETED **********
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): BUILD SUCCESSFUL
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): AutomationTool exiting with ExitCode=0 (Success)

Cheers!

6 Likes

Thanks so much for your solution , it works like a charm on latest UE5 . I’ve built the app for android and it works well !

classpath ‘com.android.tools.build:gradle:4.2.2’
Just this gave me trouble , and showed an error about formatting on the editor.

Just removed it and worked out anyway

cheers, this did the trick for me too!

1 Like

UATHelper: 打包 (Android (DXT)): > Task :app:stripDebugDebugSymbols UP-TO-DATE
UATHelper: 打包 (Android (DXT)): WARNING: Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.
UATHelper: 打包 (Android (DXT)): Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.
UATHelper: 打包 (Android (DXT)):
UATHelper: 打包 (Android (DXT)): > Task :app:validateSigningDebug UP-TO-DATE
UATHelper: 打包 (Android (DXT)): > Task :downloader_library:parseDebugLocalResources
PackagingResults: Warning: Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.
UATHelper: 打包 (Android (DXT)): > Task :app:mergeDebugResources
UATHelper: 打包 (Android (DXT)): > Task :permission_library:parseDebugLocalResources
UATHelper: 打包 (Android (DXT)): > Task :downloader_library:generateDebugRFile
UATHelper: 打包 (Android (DXT)): > Task :downloader_library:compileDebugJavaWithJavac
UATHelper: 打包 (Android (DXT)): > Task :downloader_library:bundleLibCompileToJarDebug UP-TO-DATE
UATHelper: 打包 (Android (DXT)): > Task :downloader_library:bundleLibRuntimeToJarDebug UP-TO-DATE
UATHelper: 打包 (Android (DXT)): > Task :app:mergeExtDexDebug
UATHelper: 打包 (Android (DXT)): > Task :permission_library:generateDebugRFile
UATHelper: 打包 (Android (DXT)): > Task :app:processDebugResources

UATHelper: 打包 (Android (DXT)): > Task :app:compileDebugSources
UATHelper: 打包 (Android (DXT)): > Task :app:mergeDebugJavaResource UP-TO-DATE
UATHelper: 打包 (Android (DXT)): > Task :permission_library:bundleLibRuntimeToJarDebug UP-TO-DATE
LogSlate: Last resort fallback font was requested. Font: ‘…/…/…/Engine/Content/Slate/Fonts/DroidSansFallback.ttf’, Character: ‘ͱ (U+0371)’
LogSlate: Took 0.023156 seconds to synchronously load lazily loaded font ‘…/…/…/Engine/Content/SlateDebug/Fonts/LastResort.ttf’ (5269K)
UATHelper: 打包 (Android (DXT)): > Task :app:dexBuilderDebug
UATHelper: 打包 (Android (DXT)): > Task :app:mergeLibDexDebug
UATHelper: 打包 (Android (DXT)): > Task :app:mergeProjectDexDebug
UATHelper: 打包 (Android (DXT)): > Task :app:packageDebug FAILED
UATHelper: 打包 (Android (DXT)): 57 actionable tasks: 17 executed, 40 up-to-date
UATHelper: 打包 (Android (DXT)):
UATHelper: 打包 (Android (DXT)): FAILURE: Build failed with an exception.
UATHelper: 打包 (Android (DXT)):
UATHelper: 打包 (Android (DXT)): * What went wrong:
UATHelper: 打包 (Android (DXT)): Execution failed for task ‘:app:packageDebug’.
UATHelper: 打包 (Android (DXT)): > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
UATHelper: 打包 (Android (DXT)): > Entry name ‘META-INF/android.arch.lifecycle_extensions.version’ collided
UATHelper: 打包 (Android (DXT)):
UATHelper: 打包 (Android (DXT)): * Try:
UATHelper: 打包 (Android (DXT)): 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: 打包 (Android (DXT)):
UATHelper: 打包 (Android (DXT)): * Get more help at https://help.gradle.org
UATHelper: 打包 (Android (DXT)):
UATHelper: 打包 (Android (DXT)): BUILD FAILED in 20s
UATHelper: 打包 (Android (DXT)): ERROR: cmd.exe failed with args /c “D:\unreal project\1\ARcamera\Intermediate\Android\armv7\gradle\rungradle.bat” :app:assembleDebug
UATHelper: 打包 (Android (DXT)): Took 24.9958175s to run UnrealBuildTool.exe, ExitCode=6
UATHelper: 打包 (Android (DXT)): UnrealBuildTool failed. See log for more details. (C:\Users\夜天雪\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UE_4.26\UBT-ARcamera-Android-Development.txt)
UATHelper: 打包 (Android (DXT)): AutomationTool exiting with ExitCode=6 (6)
UATHelper: 打包 (Android (DXT)): BUILD FAILED
PackagingResults: Error: cmd.exe failed with args /c “D:\unreal project\1\ARcamera\Intermediate\Android\armv7\gradle\rungradle.bat” :app:assembleDebug
PackagingResults: Error: Unknown Error
I tried to delete sdk31. Force sdk30. It also failed

Great ! it works for me ! Thank you very much

Thanks pro you save may life :purple_heart:

1 Like

Can you help me with a few questions? Can you explain what I am replacing in the sdkmanager.bat with --licenses to accept all , and is that exactly what I type?
On the Java line, if I install that new Java in Program Files it gives me an error. If I am using 4.26 how do I adjust to use this new Java and have it accept it.

Perfect!!!

Wow wow wow wow
it’s worked
Thank you who ever you are

1 Like

guys you saved my life too thankx!

thx! it works for me!

1 Like