The error is as follows:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.OutOfMemoryError (no error message)
Many people say this is caused by repeated dependencies, but my error is different from others: oom.
So I set the JVM memory to 2G, and add a line in the gradle.properties file: org.gradle.jvmargs=-Xmx2048m to set the jvm memory size
The compilation is successful!
Everyone encounters an error situation differently, the specific reason is to solve the error according to the error log