android apk build failed
---------- ErrorLog --------
Caused by: com.android.builder.dexing.DexArchiveMergerExcepti on: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at
https://developer.android.com/tools/.../multidex.html
at com.android.builder.dexing.D8DexArchiveMerger.getE xceptionToRethrow(D8DexArchiveMerger.java:131)
at com.android.builder.dexing.D8DexArchiveMerger.merg eDexArchives(D8DexArchiveMerger.java:118)
at com.android.build.gradle.internal.transforms.DexMe rgerTransformCallable.call(DexMergerTransformCalla ble.java:102)
at com.android.build.gradle.internal.transforms.DexMe rgerTransformCallable.call(DexMergerTransformCalla ble.java:37)
at java.util.concurrent.ForkJoinTask$AdaptedCallable. exec(ForkJoinTask.java:1424)
... 4 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
at com.android.tools.r8.utils.ExceptionUtils.withComp ilationHandler(ExceptionUtils.java:81)
at com.android.tools.r8.utils.ExceptionUtils.withD8Co mpilationHandler(ExceptionUtils.java:45)
at com.android.tools.r8.D8.run(D8.java:94)
at com.android.builder.dexing.D8DexArchiveMerger.merg eDexArchives(D8DexArchiveMerger.java:116)
... 7 more
Caused by: com.android.tools.r8.utils.AbortException: Error: null, Cannot fit requested classes in a single dex file (# methods: 67678 > 65536)
at com.android.tools.r8.utils.Reporter.failIfPendingE rrors(Reporter.java:101)
at com.android.tools.r8.utils.Reporter.fatalError(Rep orter.java:72)
at com.android.tools.r8.dex.VirtualFile.throwIfFull(V irtualFile.java:193)
at com.android.tools.r8.dex.VirtualFile$MonoDexDistri butor.run(VirtualFile.java:428)
at com.android.tools.r8.dex.ApplicationWriter.distrib ute(ApplicationWriter.java:200)
at com.android.tools.r8.dex.ApplicationWriter.write(A pplicationWriter.java:221)
at com.android.tools.r8.D8.run(D8.java:215)
at com.android.tools.r8.D8.lambda$run$1(D8.java:97)
at com.android.tools.r8.utils.ExceptionUtils.withComp ilationHandler(ExceptionUtils.java:62)
... 10 more
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDexRelease'.
> com.android.build.api.transform.TransformException : java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerExcepti on: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at
https://developer.android.com/tools/.../multidex.html
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See
https://docs.gradle.org/5.1.1/usergu..._line_warnings
BUILD FAILED in 19s
17 actionable tasks: 17 executed