之前本地环境编译一直是正常的,后来更新代码后,出现编译不过。
提示out of memory,但是查看swap和内存都还是够的。
里面有个提示,try increasing heap size with java option '-Xmx<size>',就按照这个来改。
失败截图:
解决方案:
- export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m"
- ./prebuilts/sdk/tools/jack-admin kill-server
- ./prebuilts/sdk/tools/jack-admin start-server
然后编译通过
- [100% 34865/34865] Checking build with Jack: out/host/common/obj/JAVA_LIBRARIES/ahat-test-dump_intermediates/jack.check.timestamp
- #### make completed successfully (27:32 (mm:ss)) ####