仅用8GB内存构建AOSP

问题描述 投票:1回答:1

我在搭建AOSP 7的时候遇到了以下麻烦。

[ 45% 16221/35670] Building with Jack:...k_intermediates/with-local/classes.dex
FAILED: /bin/bash out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex.rsp
Out of memory error (version 1.2-rc4 'Carnac' (298900 f95d7bdecfceb327f9d201a1348397ed8a843843 by [email protected])).
GC overhead limit exceeded.
Try increasing heap size with java option '-Xmx'.
Warning: This may have produced partial or corrupted output.
[ 45% 16221/35670] Building with Jack:...colorpicker_intermediates/classes.jack
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
#### make failed to build some targets (01:26:54 (hh:mm:ss)) ####

这是因为AOSP的容量变大了吗?

我在尝试建立AOSP 6或更低版本时,从未遇到过这样的麻烦。

请帮助我。

android makefile android-source ram
1个回答
2
投票

你需要编辑.jack-settings,并添加这行内容。

JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m"

希望这能解决你的问题。

© www.soinside.com 2019 - 2024. All rights reserved.