虚拟机做android N全编译报GC问题

在外出差拖着虚拟机,遇到build编译问题简直崩溃; Google一下一大把解决方法,但靠谱的没几个;

可以参考: Try increasing heap size with java option ‘-Xmx'

亲测有效:

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

./prebuilts/sdk/tools/jack-admin kill-server

./prebuilts/sdk/tools/jack-admin start-server