android gradle assembleRelease 的时候报java.lang.OutOfMemoryError: GC overhead limit exceeded”

android gradle assembleRelease 的时候报java.lang.OutOfMemoryError: GC overhead limit exceeded”


在gradle.properties 中加入下面两行


# TODO: disable daemon on CI, since builds should be clean and reliable on servers
org.gradle.daemon=true

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx4096M

主要是这个:


org.gradle.jvmargs=-Xmx4096M


如果要继续报oom 错误。可以修改这个数字更大

你可能感兴趣的:(android,编译)