kylemanna / docker-aosp

🏗 Minimal Android AOSP build environment with handy automation wrapper scripts
https://registry.hub.docker.com/u/kylemanna/aosp/
MIT License
507 stars 239 forks source link

Hello,I run the script in centos, i got Out of memory error, why?? what should i do?? #36

Open acenodie opened 7 years ago

acenodie commented 7 years ago

ninja: Entering directory `.' [ 0% 8/22706] Ensure Jack server is installed and started Writing client settings in /home/aosp/.jack-settings Installing jack server in "/home/aosp/.jack-server" Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp /home/aosp/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher [ 0% 15/22706] Building with Jack: out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/with-local/classes.dex FAILED: /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/with-local/classes.dex.rsp Out of memory error (version 1.2-rc4 'Carnac' (298900 f95d7bdecfceb327f9d201a1348397ed8a843843 by android-jack-team@google.com)). Java heap space. Try increasing heap size with java option '-Xmx'. Warning: This may have produced partial or corrupted output. [ 0% 15/22706] build out/target/common/obj/JAVA_LIBRARIES/sdk_v17_intermediates/classes.jack ninja: build stopped: subcommand failed. build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1

andr0xfe commented 7 years ago

@acenodie Try change this config file: /prebuilts/sdk/tools/jack-admin; add -Xmx4096M to JACK_SERVER_COMMAND.

  JACK_SERVER_COMMAND="java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -Xmx4096M  -cp $LAUNCHER_JAR $LAUNCHER_NAME"

-Xmx4096M == (your mem + your swap) / 4 。