0
\$\begingroup\$

I am trying to package android project in UE4.27. And getting this

enter image description here

I tried changing environment variable _JAVA_OPTIONS: -Xmx512M -Xms512M not worked.

enter image description here

Where can I change MaxHeapSize, please tell me exact location. Or any solution is there?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Please post code & error messages as formatted text rather than screenshots. Doing so makes it significantly easier for others to help read & research your problem. \$\endgroup\$
    – Pikalek
    Commented Sep 3, 2022 at 15:07

1 Answer 1

1
\$\begingroup\$

It looks like you are using a 32 bit version of Java (because if it was a 64 bit version it would explicitly say so).

The problem is that the 32 bit version doesn't support heaps larger than 2GB. You are asking for a heap twice that size.

You can solve this problem by either reducing your heap size or switching to a 64 bit JVM.

\$\endgroup\$
2
  • \$\begingroup\$ Low effort questions tend to attract down votes. I put together using the very first result I found when searching for "java invalid maximum heap size". If you encounter an unfamiliar error, try dropping the error text into a web search (part of why text is preferred to screenshots). If that doesn't lead to anything helpful, explain what you tried in your question post. \$\endgroup\$
    – Pikalek
    Commented Sep 3, 2022 at 15:34
  • 1
    \$\begingroup\$ I was indeed using 32 bit version of java so I changed it, and I didn't get the same error. I couldn't package my project but it's irrelevant to current question. so I am accepting this as answer. \$\endgroup\$
    – GEO
    Commented Sep 7, 2022 at 1:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .