when i do a build for android it will work sometimes, but more often than not the build will fail, and i check the logs.
Note: Recompile with -Xlint:unchecked for details.
:transformClassesWithDexForReleaseOpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000cb380000, 143130624, 0) failed; error='Cannot allocate memory' (errno=12)
Total time: 26.723 secs
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformClassesWithDexForRelease'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-1.8.0-openjdk-220.127.116.11-1.b12.35.amzn1.x86_64/bin/java'' finished with non-zero exit value 1
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
if i try rebuilding enough times it will eventually work, but is there anything i can do to prevent this?