Need Help: Local Build Failing (Bug #3204) – GWT compile “Java returned 137” on 4GB RAM

Hi everyone,

I am trying to build App Inventor locally to work on Bug #3204
(link: Feature Request: Add Language Search to Dropdown Menu · Issue #3204 · mit-cml/appinventor-sources · GitHub),
but I am running into persistent build failures due to hardware limitations.

My laptop has only 4 GB RAM, and the full GWT compilation keeps failing with:
“Java returned: 137” (likely out-of-memory).
I also added swap, but the build still crashes during GWT compilation.

Could you please guide me on the best workflow for low-spec machines?

Specifically:

  1. Is there a way to build only the specific component/module I am working on instead of running the full GWT compile?
  2. Should contributors rely on the MIT CI pipeline for full builds, and only push changes without building locally?
  3. Are there any lighter build options or recommended flags for low-memory systems?

I really want to continue contributing without getting blocked by full compilation issues.
Any suggestions or best practices from experienced contributors would be very helpful.

Thank you! @ewpatton

I'm not sure if that is possible, since JS has to be produced.
However, instead of building the whole of App Inventor, you can build specific parts of it.


To build the client of App Inventor:

ant webapp

To run a full build but without building the companion:

ant noplay

and many more. Check for the target parameter in the build.xml file present in the root module /appinventor and other individual child modules.


No, it is recommended you run the tests locally.


GitHub workflows may help you. After they finish compiling, you should be able to download the product locally to test it. (the build/war) directory.

In appengine/build.xml you will need to adjust the -Xmx flag in the YaClientApp target to be 3G instead of 6G. You can also pass -Dlocale=en to only build the English language portion of the UI to reduce the memory requirements.