Download

4.20 and gladle packagin error "Unable to merge dex"

I let Unreal Engine to create a copy of my project in order to give it a try with the 4.20 version. All looks fine except I can not deploy on device for this error:

LogPlayLevel: Note: Recompile with -Xlint:deprecation for details.
LogPlayLevel: :app:compileDebugSources
LogPlayLevel: :app:transformClassesWithDexBuilderForDebug
LogPlayLevel: :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
LogPlayLevel: FAILURE: Build failed with an exception.
LogPlayLevel: * What went wrong:
LogPlayLevel: Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.
LogPlayLevel: > java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
LogPlayLevel: * Try:
LogPlayLevel: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
LogPlayLevel: * Get more help at https://help.gradle.org
LogPlayLevel: BUILD FAILED in 20s
LogPlayLevel: 61 actionable tasks: 61 executed
LogPlayLevel: ERROR: cmd.exe failed with args /c “E: emp\unreal\DelcasdaFouWS\MummyGolf 4.20\Intermediate/Android/APK\gradle\rungradle.bat” :app:assembleDebug
LogPlayLevel: (see C:\Users\ddelcastillo\AppData\Roaming\Unreal Engine\AutomationTool\Logs\E+Program+Files+Epic+Games+UE_4.20\Log.txt for full exception trace)
LogPlayLevel: AutomationTool exiting with ExitCode=1 (Error_Unknown)
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 25.330994
LogPlayLevel: BUILD FAILED
PackagingResults: Error: Launch failed! Unknown Error

Did you figure it out?

This likely means you are including two different versions of a library, at least that’s the context where I’ve seen dex merge errors. To get more info you can open a command / powershell prompt at “E: emp\unreal\DelcasdaFouWS\MummyGolf 4.20\Intermediate/Android/APK\gradle” and run “rungradle.bat :app:dependencies” that should tell you what versions of what libraries gradle is trying to generate “dex” class files for.

Getting similar error in unreal 4.21 can any one please help…