Execution failed for task ':app:transformClassesWithDexForDebug'

UATHelper: パッケージ化 (Android (ASTC)): :app:transformClassesWithDexForDebug FAILED
UATHelper: パッケージ化 (Android (ASTC)): FAILURE: Build failed with an exception.
UATHelper: パッケージ化 (Android (ASTC)): * What went wrong:
UATHelper: パッケージ化 (Android (ASTC)): Execution failed for task ‘:app:transformClassesWithDexForDebug’.
UATHelper: パッケージ化 (Android (ASTC)): > java.util.concurrent.ExecutionException: Multiple dex files define Lcom/google/android/gms/internal/zzex;
UATHelper: パッケージ化 (Android (ASTC)): * Try:
UATHelper: パッケージ化 (Android (ASTC)): Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
UATHelper: パッケージ化 (Android (ASTC)): BUILD FAILED
UATHelper: パッケージ化 (Android (ASTC)): Total time: 40.215 secs
UATHelper: パッケージ化 (Android (ASTC)): ERROR: cmd.exe failed with args /c “***\gradle\rungradle.bat” :app:assembleDebug

I got error with android build.
somebody help me.

Hi frmski,

The issue you’ve hit (with it’s incredibly obscure, useless error message), is that your app has more than 65k symbols to export on Android, but dex (android’s bytecode) only supports up to 65k. They have since added a feature to create multiple dexes, so that you can work around this, but it’s not supported in Unreal by default. You can either dig into the build system, settings etc to take care of this yourself, or use the MultiDex plugin by gamednastudio, in the unreal marketplace. Their plugin only ships with Arm7 binaries, though, so if you want arm64 support, grab the source from github (GitHub - gameDNAstudio/MultiDex: Plugin for Unreal Engine 4 which eliminates infamous problem with "64k methods"), and use that.

Hope this helps.