Skip to content

ERROR: R8: java.lang.OutOfMemoryError: Java heap space #2632

Closed Answered by himesh-cm
damianzdunekinertia asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @damianzdunekinertia

After checking your gradlew file, please add the below snippet

set -- "-Dorg.gradle.jvmargs=-Xmx4096m" "$@"

exec "$JAVACMD" "$@" 

instead of
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain -Dorg.gradle.jvmargs="-Xmx4096m" "$@"

Please try it locally first and let me know, if you run into any issues.

Replies: 4 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@damianzdunekinertia
Comment options

@damianzdunekinertia
Comment options

@himesh-cm
Comment options

Answer selected by damianzdunekinertia
@damianzdunekinertia
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hnvn
Comment options

Comment options

You must be logged in to vote
1 reply
@ChauCM
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
flutter Queries Related to Flutter hp code signing android
5 participants